Ubuntu 11.10编译android源代码2.3.1 (32位) <编译> .

进入源代码目录: 

 $ source build/envsetup.sh

  $  lunch full-eng

 

显示如下信息:

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.1

TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRI40

 

给权限,不然首先就会出错

进入源代码目录: 

$sudo chmod -R 777 *

$ make -j2

 

以下参看别人的

然后依次修改以下四个make文件:
external/clearsilver/cgi/Android.mk
external/clearsilver/java-jni/Android.mk
external/clearsilver/util/Android.mk
external/clearsilver/cs/Android.mk

将其中的
LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64

修改为
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32

2.Q:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
 make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1

解决方法:
$ gedit frameworks/base/libs/utils/Android.mk

修改以下语句
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)


LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) –fpermissive

 

 

编译Android源码 解决[out/target/common/docs/api-stubs-timestamp] 错误 45


解决办法:
make clean
make update-api
make

 

 

 


 

你可能感兴趣的:(Ubuntu 11.10编译android源代码2.3.1 (32位) <编译> .)