材料:友善之臂Tiny6410开发板
配套android2.3.4 uboot kernel2.6.36
工具:ubuntu14.04 64bit
0 编译uboot和kernel没有遇到太多的问题,在此略过
1 'frameworks/base/frameworks/base/docs/html': No such file or directory
'/out/target/common/docs/gen':No such file or directory
解决:
mkdir -p frameworks/base/frameworks/base/docs/html
mkdir -p out/target/common/docs/gen
2
BEGIN failed--compilation aborted at external/webkit/WebCore/dom/make_names.pl line 38.
make: *** [out/target/product/mini6410/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLElementFactory.h] Error 2
解决:
sudo apt-get install libswitch-perl
3
error: 'indexOfKey' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
解决:
vi frameworks/base/libs/utils/Android.mk
Add '-fpermissive' to line 60:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
vi frameworks/base/tools/aapt/Android.mk
Add '-fpermissive' to line 31:
LOCAL_CFLAGS += -Wno-format-y2k -fpermissive
4 make: *** [out/host/linux-x86/obj/EXECUTABLES/grxmlcompile_intermediates/grxmlcompile.o] Error 1
解决:
cd external/srec
wget "https://github.com/CyanogenMod/android_external_srec/commit/4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff"
patch -p1 < 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
rm -f 4d7ae7b79eda47e489669fbbe1f91ec501d42fb2.diff
cd ../..
5 出现一系列如下问题:
dalvik/vm/oo/ObjectInlines.h: In function 'dvmSetObjectArrayElement':
dalvik/vm/oo/ObjectInlines.h:29:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((Object **)(obj)->contents)[index] = val;
^
dalvik/vm/native/dalvik_system_Zygote.c: In function 'setgroupsIntarray':
dalvik/vm/native/dalvik_system_Zygote.c:171:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
contents = (s4 *)gidArray->contents;
^
解决:需要在源码dalvik/vm/native/dalvik_system_Zygote.c前面添加头部文件#include <sys/resource.h>
6
make: *** [out/target/product/kryuha/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLElementFactory.h] Error 255 解决:这是编译器的问题,我的机器上gcc g++版本都是4.8.5,需要换成4.6,参考网上资料重新下载4.6版本缤设置优先级 $sudo apt-get install gcc-4.6
$sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 (这里“40” 是优先级,值越大优先级越高)
$sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 (本机自带的设置为60更高的优先级)
选择系统默认的gcc
$sudo update-alternatives --config gcc
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/gcc-4.8 60 auto mode
1 /usr/bin/gcc-4.6 40 manual mode
2 /usr/bin/gcc-4.8 60 manual mode
默认系统用最高优先级的, 这里我们选择1就可以了
接下来,g++ 同样的步骤操作
$sudo apt-get install g++-4.6
$sudo apt-get install g++-4.6-multilib
$sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 40
$sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 60
$sudo update-alternatives --config g++
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/g++-4.8 60 auto mode
1 /usr/bin/g++-4.6 40 manual mode
2 /usr/bin/g++-4.8 60 manual mode
选择1.
如果想改为高版本的随时用update-alternatives --config 命令切换!
7
Could not load 'clearsilver-jni'
java.library.path = out/host/linux-x86/lib
make: *** [out/target/common/docs/api-stubs-timestamp] Error 45
make: *** Waiting for unfinished jobs....
make: *** [out/target/common/docs/doc-comment-check-timestamp] Error 45
解决:友善之臂提供的jdk1.6是32bit的,所以重新找了个64bit的,问题解决