AOSP生成错误:未定义符号



我正在尝试基于AOSP 4.3_r2.2构建基石。我在建造过程中犯了很多错误,比如:

frameworks/base/core/res/res/values/public.xml:244: error: Symbol 'config_bluetooth_adapter_quick_switch' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1558: error: Symbol 'config_enableDreams' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:919: error: Symbol 'ic_suggestions_add' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:920: error: Symbol 'ic_suggestions_delete' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1244: error: Symbol 'backspace' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1250: error: Symbol 'carrier' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:130: error: Symbol 'dangerous_perms_list' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1253: error: Symbol 'emergencyCallButton' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1254: error: Symbol 'faceLockAreaView' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1256: error: Symbol 'forgotPatternButton' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1258: error: Symbol 'headerText' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1260: error: Symbol 'instructions' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:1263: error: Symbol 'lockPattern' declared with <java-symbol> not defined
frameworks/base/core/res/res/values/public.xml:131: error: Symbol 'non_dangerous_perms_list' declared with <java-symbol> not defined
...
make: *** [out/target/common/obj/APPS/framework-res_intermediates/package-export.apk] Error 1
make: *** Deleting file `out/target/common/obj/APPS/framework-res_intermediates/package-export.apk'
make: *** Waiting for unfinished jobs....

我在这里搜索了一下,发现了这个问题。所以我知道这可能是缺少符号定义问题。但当我查看public.xml时,我发现它们属于不同的类型,比如:

<java-symbol type="bool" name="config_bluetooth_sco_off_call" />
<java-symbol type="bool" name="config_enableDreams" />
<java-symbol type="drawable" name="ic_suggestions_add" />
<java-symbol type="drawable" name="ic_suggestions_delete" />
<java-symbol type="id" name="backspace" />
<java-symbol type="id" name="carrier" />
<java-symbol type="id" name="dangerous_perms_list" />
...

我还发现frameworks/base/core/res/MakeJavaSymbols.sed中有一个脚本文件,上面写着命令

make framework 2>&1 | sed -n -f MakeJavaSymbols.sed | sort -u

可以用于生成丢失的资源。我搜索了很多,我找到的只是为了运行这个命令,它会输出缺失的部分。但我跑了,什么也没发生。所以我的问题是,我应该在哪里以及如何添加这些缺失的符号?它们有数百个,我需要手动添加吗?我错过什么了吗?由于我是AOSP框架的新手,所以请帮忙。

通过以下操作最终解决了问题:1.从public.xml中删除了符号定义;2.将android.view.Surface替换为android.vview.SurfaceControl,将WindowManagerService.DEFAULT_DIM_DURATION替换为WindowAnimationr.DEFAULT_DIM _DURATION.

之后,我成功地编译了它,并且它可以运行,尽管仍然存在一些问题。

相关内容

  • 没有找到相关文章

最新更新