主题 : 编译Android2.3.4时出现的错误问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 55135
精华: 0
发帖: 33
金钱: 175 两
威望: 35 点
综合积分: 66 分
注册时间: 2011-09-13
最后登录: 2018-02-08
楼主  发表于: 2011-11-25 16:47

 编译Android2.3.4时出现的错误问题

我用Fedora15编译Android2.3.4,按照手册上的步骤一步一步来的,出现了错误,咨询一下各位是怎么回事呢?打印信息如下

[root@angyang Android-2.3.4]# ./build-android
including device/htc/passion/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=mini6410
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=GRJ22
============================================
find: `frameworks/base/frameworks/base/docs/html': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `frameworks/base/frameworks/base/docs/html': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `frameworks/base/frameworks/base/docs/html': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `frameworks/base/frameworks/base/docs/html': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
find: `frameworks/base/frameworks/base/docs/html': No such file or directory
find: `out/target/common/docs/gen': No such file or directory
external/webkit/Android.mk:230: "JavaScript JIT enabled!"
Using 'us' ICU data for FriendlyARM mini6410
build/core/Makefile:21: warning: overriding recipe for target `out/target/product/mini6410/system/usr/keylayout/qwerty.kl'
sdk/emulator/keymaps/Android.mk:13: warning: ignoring old recipe for target `out/target/product/mini6410/system/usr/keylayout/qwerty.kl'
Install: out/host/linux-x86/framework/apicheck.jar
Install: out/host/linux-x86/framework/clearsilver.jar
Install: out/host/linux-x86/framework/droiddoc.jar
Install: out/host/linux-x86/lib/libneo_util.so
Install: out/host/linux-x86/lib/libneo_cs.so
Install: out/host/linux-x86/lib/libneo_cgi.so
Install: out/host/linux-x86/lib/libclearsilver-jni.so
Copying: out/target/common/obj/JAVA_LIBRARIES/core_intermediates/emma_out/lib/classes-jarjar.jar
Install: out/host/linux-x86/framework/dx.jar
Install: out/host/linux-x86/bin/dx
host C++: libutils <= frameworks/base/libs/utils/RefBase.cpp
frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
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

级别: 圣骑士
UID: 44407
精华: 0
发帖: 386
金钱: 1945 两
威望: 389 点
综合积分: 772 分
注册时间: 2011-04-25
最后登录: 2014-08-25
1楼  发表于: 2011-11-25 18:31
级别: 新手上路
UID: 55135
精华: 0
发帖: 33
金钱: 175 两
威望: 35 点
综合积分: 66 分
注册时间: 2011-09-13
最后登录: 2018-02-08
2楼  发表于: 2011-11-26 09:09
楼上这位大虾,我试着他的第一步就错了,请看一下是什么问题呢?错误信息
[root@angyang ~]# yum install gperf
Loaded plugins: langpacks, presto, refresh-packagekit
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again
级别: 荣誉会员
UID: 34761
精华: 0
发帖: 1348
金钱: 6835 两
威望: 1367 点
综合积分: 2696 分
注册时间: 2010-12-21
最后登录: 2017-06-02
3楼  发表于: 2011-11-26 13:45
装的是 32bit 版本的fedora15么?
级别: 新手上路
UID: 55135
精华: 0
发帖: 33
金钱: 175 两
威望: 35 点
综合积分: 66 分
注册时间: 2011-09-13
最后登录: 2018-02-08
4楼  发表于: 2011-11-26 14:35
是用得32位t的啊
级别: 圣骑士
UID: 44407
精华: 0
发帖: 386
金钱: 1945 两
威望: 389 点
综合积分: 772 分
注册时间: 2011-04-25
最后登录: 2014-08-25
5楼  发表于: 2011-11-28 09:56
估計是yum 或yum 的網站出了問題
先試著更新yum ,不行的話,就用網頁下載,最後再不行的話,就降fedora的版本
偶是在FC 12/14 32位元編譯成功的...我有在那個網頁寫出我的步驟,照著步驟應該都會過的
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2011-11-28 12:40

 回 楼主(zzzkkk75) 的帖子

我想你真正要解决的问题是

frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
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]

吧, 这种编译错误google一下就很容易找到解决的办法. 这里就是一个https://github.com/CyanogenMod/android_frameworks_base/commit/7de8ddfa1056e402a0bf537628317a90823e4a8e#libs/utils/RefBase.cpp
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."