编译Android源代码时报错,错误提示如下:
compile the Main_*.java files
dxconverter test suite sucessfully built!
intermediate Main_*.java files (for stacktrace analysis) can be found under out/host/linux-x86/obj/EXECUTABLES/dx-tests_intermediates/mainfiles
Install: out/host/linux-x86/bin/dx-tests
host Executable: emulator_renderer (out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer)
/usr/bin/ld: out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/main.o: undefined reference to symbol 'XInitThreads'
/usr/bin/ld: note: 'XInitThreads' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line
/usr/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/emulator_renderer_intermediates/emulator_renderer] Error 1
[xoxo@Xoxo Android]$ emulator
emulator: ERROR: No initial system image for this configuration!求解!

解决方案 »

  1.   

    有人认为这是Fedora的一个bug,如果你的程序需要引用libA和libB,而libB又需要引用libA,那么你的程序可能只会连接libB。
    于是上面报错的意思应该是程序需要libthreads.so (也许),而libthreads.so需要的东西又在/usr/lib/libX11.so.6中,因此程序找不到/usr/lib/libX11.so.6。
    根据官方的建议,只要在gcc的-o参数后加上/usr/lib/libX11.so.6即可,应该修改Makefile文件,打开 Makefile文件,找到
    LIBS = $(SUBLIBS)   -lcurl -lssl ./libfetion/lib/libfetion_32.a -lQtXmlPatterns -lQtXml -lQtGui -lQtCore -lpthread一行,在其后面加上/usr/lib/libX11.so.6即可。=========================================
    感谢绿色圣光指点,在后面加上 -ldl即可
    LIBS = $(SUBLIBS)   -lcurl -lssl ./libfetion/lib/libfetion_32.a -lQtXmlPatterns -lQtXml -lQtGui -lQtCore -lpthread -ldl不知道这个解释是否正确,而且我找不到要改的Makefile文件在哪,
      

  2.   

    这是哪的官方建议?怎么链接Qt lib
      

  3.   

    development/tools/emulator/opengl/host/renderer/Android.mk:
    LOCAL_LDLIBS += -lX11It works for my Fedora 15
    网上论坛找的,我正在试
      

  4.   

    找到一个在fedora 16上编译android源码的链接,很全面:
    http://www.mail-archive.com/[email protected]/msg17460.html