AOSP构建错误:未定义符号 [英] AOSP building error: symbol not defined

查看:286
本文介绍了AOSP构建错误:未定义符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试基于AOSP 4.3_r2.2构建 cornerstone 。在构建过程中,我遇到了很多错误,例如:

I'm trying to build the cornerstone based on AOSP 4.3_r2.2. I got a lot of errors during the building like these:

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时,我看到它们属于以下不同类型:

I searched here and found this issue. So I know this could be missing the symbol definition problem. But when I look at the public.xml, I see they belong to different types like these:

<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,它表示命令

I also found there's a script file at frameworks/base/core/res/MakeJavaSymbols.sed, it says the command

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

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

can be used to generate the missing resources. I searched a lot, all I found just to run this command, and it'll output the missing parts. But I ran it, nothing happened. So my question is where and how should I add these missing symbols? There are hundreds of them, do I need to add them manually? Did I missed something? Since I'm new in AOSP framework, so please help.

推荐答案

最终通过以下方法解决了该问题:
1.从public.xml中删除符号定义;
2.将android.view.Surface替换为android.view.SurfaceControl,并将WindowManagerService.DEFAULT_DIM_DURATION替换为WindowAnimator.DEFAULT_DIM_DURATION。

Finally resolved the problem, by did these: 1. Removed the symbol definition from public.xml; 2. Replaced android.view.Surface with android.view.SurfaceControl, and WindowManagerService.DEFAULT_DIM_DURATION with WindowAnimator.DEFAULT_DIM_DURATION.

此后,我将其编译成功,尽管仍然存在一些问题,它仍可以运行。

After that, I compile it succeed, and it can be run, although there still have some problems.

这篇关于AOSP构建错误:未定义符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆