问题
I downloaded the latest cocos2dx(3.10) and NDK(r11). I have the following error when I executed cocos compile -p android --android-studio
.
Error:
~/AndroidDev/android-ndk-r11/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory
Then I found in NDK Revision History
here for r11 the following:
Removed GCC 4.8. All targets now use GCC 4.9.
Are there workarounds to switch cocos2dx settings to 4.9?
回答1:
In your NDK directory create RELEASE.txt file and enter the version, e.g.
r11c (64-bit)
回答2:
I also had the same problem and I solved it by downgrading my NDK to the 10 version. I think Cocos2d-X may not be compatible with the NDK 11, since the RELEASE.txt file is missing from it.
回答3:
I started with NDK 11 which didn't work. Possible problem as you told is RELEASE.txt doesn't exist for that but then I downgraded to NDK 10e, still didn't work even though RELEASE.txt was present. Then I had to downgrade to NDK 9d which worked without any modifications.
来源:https://stackoverflow.com/questions/36128567/cocos2dx-android-build-error-arm-linux-androideabi-g-no-such-file-or-direct