感谢支持
我们一直在努力

使用Ubuntu x86_64位元编译Android代码遇到的library问题(solved)

第一 通常編譯在一開始會遇到如下狀況


make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl]


Error 1 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libstdc++.so when searching for -lstdc++


/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libstdc++.a when searching for -lstdc++


/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libstdc++.so when searching for -lstdc++


/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libstdc++.a when searching for -lstdc++


/usr/bin/ld: cannot find -lstdc++ collect2: ld returned 1 exit status


其找不到libstdc++,解決的方法是安裝下面套件


 apt-get install g++-multilib


接下來又遇到類似相同問題:如下:


-o out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt -lz -lrt


/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../libz.so when searching for -lz


/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../libz.a when searching for -lz


/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz /usr/bin/ld: skipping incompatible


/usr/lib/libz.a when searching for -lz /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status


make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1


其找不到libz,解決方法為安裝下面套件


apt-get install lib32z1-dev


 



接著一樣,


/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.1/../../../libncurses.so when searching for -lncurses


/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.1/../../../libncurses.a when searching for -lncurses


/usr/bin/ld: skipping incompatible /usr/lib/libncurses.so when searching for -lncurses


/usr/bin/ld: skipping incompatible /usr/lib/libncurses.a when searching for -lncurses


/usr/bin/ld: cannot find -lncurses


collect2: ld returned 1 exit status


make: *** [out/host/linux-x86/obj/EXECUTABLES/adb_intermediates/adb] Error 1


apt-get install lib32ncurses5-dev

赞(0) 打赏
转载请注明出处:服务器评测 » 使用Ubuntu x86_64位元编译Android代码遇到的library问题(solved)
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏