我正在尝试基于AOSP 4.3_r2.2构建cornerstone。我在建筑期间遇到了很多错误:
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....
我在这里搜索了issue。所以我知道这可能会缺少符号定义问题。但是当我查看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框架的新手,所以请帮助。
答案 0 :(得分:0)
最后通过以下方式解决了问题: 1.从public.xml中删除了符号定义; 2.用android.view.SurfaceControl替换android.view.Surface,用WindowAnimator.DEFAULT_DIM_DURATION替换WindowManagerService.DEFAULT_DIM_DURATION。
之后,我编译成功,可以运行,但仍有一些问题。