• <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里面添加一個res,把xml寫好以后編譯時候報錯

                    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

            解決辦法很簡單,在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

            重新編譯會產(chǎn)生
              <java-symbol type="string" name="xxxxxxxxxx" />
            把這個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.
              -->

            看起來所有private的internal res都必須在這里聲明一下。JellyBean以前貌似沒有這么麻煩。好在他提供了一個sed,免得全部手寫。





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

            評論

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

            為什么我運行這個命令,不會自動生成啊?請指教啊  回復  更多評論   

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

            @陳
            那應該是沒有報前面的錯誤,你可以查看一下那個sed腳本是怎么分析compiler的輸出的。
              回復  更多評論   

            久久丝袜精品中文字幕| 久久亚洲精精品中文字幕| 91精品国产综合久久四虎久久无码一级| 久久综合国产乱子伦精品免费| 久久这里只有精品久久| 久久精品综合一区二区三区| 欧美日韩精品久久久免费观看| 亚洲AV无码久久精品蜜桃| 国产精品久久久久影院嫩草| 久久久噜噜噜久久中文字幕色伊伊| 亚洲伊人久久综合中文成人网| 精品国产福利久久久| 一本色道久久88综合日韩精品 | 四虎国产永久免费久久| 伊人色综合久久天天人守人婷| 久久久久女人精品毛片| 久久综合色区| 日本免费久久久久久久网站| 亚洲AV日韩精品久久久久| 久久精品国产一区二区三区不卡| 无码人妻久久一区二区三区免费丨| 久久久久成人精品无码| 久久久久免费精品国产| 久久精品aⅴ无码中文字字幕不卡| 天天做夜夜做久久做狠狠| 亚洲国产精品久久66| 久久亚洲日韩精品一区二区三区| 亚洲精品久久久www| 国产精品xxxx国产喷水亚洲国产精品无码久久一区 | 国产三级精品久久| 成人国内精品久久久久影院| 久久综合久久伊人| 久久精品亚洲乱码伦伦中文| 精品久久久久久久久中文字幕| 精品久久久久久成人AV| WWW婷婷AV久久久影片| 国产麻豆精品久久一二三| 日韩精品无码久久久久久| 欧洲成人午夜精品无码区久久| 亚洲级αV无码毛片久久精品| 新狼窝色AV性久久久久久|