我试图在我的设备上构建它,但在构建过程中遇到了一些问题。首先,我同步了AOSP 4.3_r2.2源代码树。然后我将整个基石代码(从分支v4.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
...
经过比较后,我发现很多缺少的符号似乎只出现在public.xml中。如果我是对的,我认为这些符号应该在其他地方定义,然后添加到public.xml中。所以我只是通过将public.xml恢复为未修改(git checkout)来删除它们。
然后当我再次跑步时,我得到了这样的错误:
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:57: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimAnimator.java:54: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
frameworks/base/services/java/com/android/server/wm/DimSurface.java:48: cannot find symbol
symbol : variable FX_SURFACE_DIM
location: class android.view.Surface
Surface.FX_SURFACE_DIM);
^
frameworks/base/services/java/com/android/server/wm/DimSurface.java:45: internal error; cannot instantiate com.android.server.wm.WindowStateAnimator.SurfaceTrace.<init> at com.android.server.wm.WindowStateAnimator.SurfaceTrace to ()
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
^
...
通过查看AOSP源代码,我发现Surface.FX_SURFACE_DIM应该是SurfaceControl.FX_SURFACE_DIM,并且WindowStateAnimator.SurfaceTrace构造函数的参数编号是不同的。所以我想知道我是否使用&#34;对&#34; AOSP的源代码树?如果没有,我应该同步哪个版本?由于与基石中的代码存在很多差异。
感谢。