Android编译问题

环境: Ubuntu 10.10 64 bit jdk1.6

  错误1:

  /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

  解决:

  sudo apt-get install libc6-dev-i386

  错误2:

  host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)

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

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

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

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

  解决:

  sudo apt-get install g++-multilib

  错误3:

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

  /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../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

  解决:

  sudo apt-get install lib32z1-dev

  错误4:

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

  /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../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

  解决:

sudo apt-get install lib32ncurses5-dev

  错误5:

  In file included from external/qemu/Android/skin/window.c:19:

  prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:55:22: error: X11/Xlib.h: 没有那个文件或目录

  prebuilt/linux-x86/sdl/include/SDL/SDL_syswm.h:56:23: error: X11/Xatom.h: 没有那个文件或目录

  解决:

  sudo apt-get install libx11-dev

 

8. Android编译遇到错误/usr/bin/ld: cannot find -lstdc++的解决
             首先发现编译2.2版,gcc4.3和gcc4.4没有什么区别。
 

               /usr/bin/ld: cannot find -lstdc++

                ============================================
                PLATFORM_VERSION_CODENAME=AOSP
                PLATFORM_VERSION=AOSP
                TARGET_PRODUCT=generic
                TARGET_BUILD_VARIANT=eng
                TARGET_SIMULATOR=
                TARGET_BUILD_TYPE=release
                TARGET_BUILD_APPS=
                TARGET_ARCH=arm
                HOST_ARCH=x86
                HOST_OS=linux
                HOST_BUILD_TYPE=release
                BUILD_ID=OPENMASTER
                ============================================

                 host SharedLib: libneo_util (out/host/linux-x86/obj/lib/libneo_util.so)
                /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.so when searching for -lstdc++
                /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.a when searching for -lstdc++
                /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.so when searching for -lstdc++
                /usr/bin/ld: skipping incompatible /usr/lib/gcc/i486-linux-gnu/4.3.4/libstdc++.a when searching for -lstdc++
                /usr/bin/ld: cannot find -lstdc++
                collect2: ld returned 1 exit status
                make: *** [out/host/linux-x86/obj/lib/libneo_util.so] 错误 1

 

解决办法:缺少g++-multilib库,安装即可: apt-get install g++-multilib 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值