cocos2dx 3.16 lua 打包成apk遇到的坑
环境
- win10
- cocos2dx 3.16 +lua
- apache-ant-1.10.8
- android-ndk-r21
- android-sdk
- python2.7
- java 1.8.0_202
在项目根目录执行
cocos compile -p android --ap android-22
C:/android-ndk-r21/build//…/build/core/add-application.mk:178: *** Android NDK: APP_STL gnustl_static is no longer supported. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information. . Stop.
make: Leaving directory ‘C:/cocos2d-x-3.16/tests/lua-game-controller-test/project/proj.android’
执行命令出错,返回值:2。
-
frameworks\runtime-src\proj.android\jni\Application.mk
中的APP_STL
改为c++_static
APP_STL := c++_static
改完又出现这个问题
Android NDK: The armeabi ABI is no longer supported. Use armeabi-v7a.
Android NDK: NDK Application ‘local’ targets unknown ABI(s): armeabi
Android NDK: Please fix the APP_ABI definition in ./jni/Application.mk
C:/android-ndk-r21/build//…/build/core/setup-app.mk:79: *** Android NDK: Aborting . Stop.
make: Leaving directory ‘C:/cocos2d-x-3.16/tests/lua-game-controller-test/project/proj.android’
执行命令出错,返回值:2。
-
frameworks\runtime-src\proj.android\jni\Application.mk
中的APP_ABI
改为armeabi-v7a
后面就编译成功了在simulator\android
可以看到apk
本文地址:https://blog.csdn.net/qq_41065919/article/details/107157680