Cocos2d-x error while compiling LOCAL_SRC_FILES points to a missing file (and folder) Windows

限于喜欢 提交于 2019-12-05 11:22:27

The following worked for me

cocos compile --android-studio --target android-22 
    --ap android-22 --ndk-mode debug --ndk-toolchain arm-linux-androideabi-4.9 
    --platform android --app-abi armeabi --src C:\cocos2d-x\tests\cpp-tests

You will need to replace the --ndk-toolchain to the proper one that comes with your NDK installation. Check in the toolchains folder inside NDK_ROOT.

The most important one that actually got it working was --app-abi armeabi as that is what was the toolchain used.

[Edit] If you actually check cocos compile -h you will see that --app-abi mentions armeabi as the default. But that is not the case. It is picking up arm64 as the default.

First of all, the commands to compile the android project starts with cocos not coconuts.

cocos compile -p android --android-studio

or

cocos compile -p android

Now, for the above error, it seems, you haven't set NDK_HOME path in environment variable. You can set it manually or goto your cocos2d-x library folder from terminal and run

./setup.py

It will do the rest.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!