• <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

            重新編譯會產生
              <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 閱讀(2264) 評論(2)  編輯 收藏 引用

            評論

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

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

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

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

            欧美精品一区二区精品久久 | 久久这里的只有是精品23| 久久久精品人妻无码专区不卡| 久久久精品久久久久久| 久久精品人人做人人妻人人玩| 精品久久久久久99人妻| 亚洲第一极品精品无码久久| 久久精品国产一区二区| 日韩人妻无码一区二区三区久久| 久久综合九色综合97_久久久| 超级97碰碰碰碰久久久久最新| 久久ZYZ资源站无码中文动漫| 久久精品一区二区三区中文字幕| 久久精品aⅴ无码中文字字幕重口| 国产精品一区二区久久精品无码 | 亚洲人成网站999久久久综合| 国产精品久久自在自线观看| 久久99久国产麻精品66| 久久人人爽人人澡人人高潮AV| 国产Av激情久久无码天堂| 久久久无码精品亚洲日韩京东传媒| 精品视频久久久久| 久久精品无码一区二区三区| 亚洲日本va中文字幕久久| 无码任你躁久久久久久久| 国产精品日韩深夜福利久久| 99久久国产热无码精品免费久久久久| 中文字幕热久久久久久久| 色播久久人人爽人人爽人人片AV| 国内精品久久久久久久久| 成人免费网站久久久| 久久精品亚洲精品国产色婷| 久久天天躁狠狠躁夜夜avapp | 99久久婷婷国产综合精品草原 | 精产国品久久一二三产区区别| 久久久国产一区二区三区| 久久91精品综合国产首页| 精品久久久久久无码人妻热| 国内精品久久久久久久coent | 亚洲国产精品一区二区三区久久| 久久嫩草影院免费看夜色|