很是好的下載android codes地址: http://d.zhu.im/Android/ linux
抓下來全部的codes,設置環境變量,開始make... android
1.prebuilt/ndk/android-ndk-r5/platforms/android-9/arch-arm/usr/include/sys/types.h:1: error: expected identifier or '(' before '!' token
prebuilt/ndk/android-ndk-r5/platforms/android-9/arch-arm/usr/include/sys/types.h:1: error: stray '\377' in program
prebuilt/ndk/android-ndk-r5/platforms/android-9/arch-arm/usr/include/sys/types.h:1: error: stray '\376' in program c++
等等之類的錯誤。 ide
解決方案: ui
發現types.h文件的內容是: idea
!<symlink>? . / . . / . . / . . / . . / . . / p l a t f o r m s / a n d r o i d - 8 / a r c h - a r m / u s r / i n c l u d e / s y s / t y p e s . h spa
這裏應該的意思是用a n d r o i d - 8下面header file,一樣打開a n d r o i d - 8下面的文件,發現相似,因此繼續找,在a n d r o i d - 3中,終於找到「真身」。 code
不清楚!<symlink>?是什麼東西,乾脆相似文件,所有用a n d r o i d - 3下面的覆蓋過來。 orm
遇到一個相似問題:
token
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: error: prebuilt/ndk/android-ndk-r5/platforms/android-9/arch-arm/usr/lib/libstdc++.so:1:1: syntax error, unexpected '!', expecting $end
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: error: prebuilt/ndk/android-ndk-r5/platforms/android-9/arch-arm/usr/lib/libstdc++.so: not an object or archive
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: error: prebuilt/ndk/android-ndk-r5/platforms/android-9/arch-arm/usr/lib/libm.so:1:1: syntax error, unexpected '!', expecting $end
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: error: prebuilt/ndk/android-ndk-r5/platforms/android-9/arch-arm/usr/lib/libm.so: not an object or archive
collect2: ld returned 1 exit status
解決辦法:prebuilt/ndk/android-ndk-r5/platforms/android-9/arch-arm/usr/lib/libstdc++.so文件不正確,只是prebuilt/ndk/android-ndk-r5/platforms/android-3/arch-arm/usr/lib/libstdc++.so的ln。沒有實際內容:應該也是在文件中出現了!<symlink>?