• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            ++wythern++

            X presents Y for a better Z

            給Android JellyBean添加internal resource

            想給Androird JellyBean 4.1.0的framework里面添加一個(gè)res,把xml寫(xiě)好以后編譯時(shí)候報(bào)錯(cuò)

                    int ticker = com.android.internal.R.string.xxxxxxxxxx;
                                                              ^
            frameworks/base/services/java/com/android/server/StatusBarManagerService.java:143: cannot find symbol
            symbol  : variable xxxxxxxxxx
            location: class com.android.internal.R.drawable

            解決辦法很簡(jiǎn)單,在MakeJavaSymbols.sed里面有:
            # Run this on the errors output by javac of missing resource symbols,
            # to generate the set of <java-symbol> commands to have aapt generate
            # the symbol for them.
            #
            # For example: make framework 2>&1 | sed -n -f MakeJavaSymbols.sed | sort -u

            重新編譯會(huì)產(chǎn)生
              <java-symbol type="string" name="xxxxxxxxxx" />
            把這個(gè)copy到publlic.xml。再重新編譯一次就搞定了。

            public.xml也提到
            <!-- Private symbols that we need to reference from framework code.  See
                   frameworks/base/core/res/MakeJavaSymbols.sed for how to easily generate
                   this.
              -->

            看起來(lái)所有private的internal res都必須在這里聲明一下。JellyBean以前貌似沒(méi)有這么麻煩。好在他提供了一個(gè)sed,免得全部手寫(xiě)。





            posted on 2012-09-20 14:40 wythern 閱讀(2264) 評(píng)論(2)  編輯 收藏 引用

            評(píng)論

            # re: 給Android JellyBean添加internal resource[未登錄](méi) 2012-12-21 13:03

            為什么我運(yùn)行這個(gè)命令,不會(huì)自動(dòng)生成啊?請(qǐng)指教啊  回復(fù)  更多評(píng)論   

            # re: 給Android JellyBean添加internal resource[未登錄](méi) 2012-12-21 17:01 wythern

            @陳
            那應(yīng)該是沒(méi)有報(bào)前面的錯(cuò)誤,你可以查看一下那個(gè)sed腳本是怎么分析compiler的輸出的。
              回復(fù)  更多評(píng)論   


            只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


            麻豆成人久久精品二区三区免费| 2021久久国自产拍精品| 精品久久久无码中文字幕天天| 好久久免费视频高清| 久久99精品久久久久久水蜜桃| 久久久久久青草大香综合精品| 99久久99久久精品国产片果冻| 久久国产亚洲精品无码| 久久无码国产| 久久青草国产手机看片福利盒子| 久久综合久久鬼色| 97久久久精品综合88久久| 免费精品久久久久久中文字幕 | 午夜精品久久久久久久无码| 一本色道久久综合亚洲精品| 日本道色综合久久影院| 亚洲日本va中文字幕久久| 国产亚洲美女精品久久久| 麻豆一区二区99久久久久| 欧美一区二区久久精品| 99久久99久久精品国产| 99久久婷婷国产综合亚洲| 一级做a爰片久久毛片毛片| 久久精品国产亚洲AV不卡| 国产精品18久久久久久vr | 久久久久久久综合狠狠综合| 久久精品成人免费看| 精品久久无码中文字幕| 亚洲综合精品香蕉久久网| 一97日本道伊人久久综合影院| 99久久婷婷国产一区二区| 精品久久久久香蕉网| 久久精品中文字幕无码绿巨人| 亚洲精品久久久www| 久久亚洲欧洲国产综合| 岛国搬运www久久| 国产一区二区精品久久岳| 91久久成人免费| 久久久99精品成人片中文字幕 | 久久93精品国产91久久综合| 久久国产高清字幕中文|