欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

cocos2dx 3.16 lua 打包成apk遇到的坑

程序员文章站 2022-03-14 19:52:56
cocos2dx 3.16 lua 打包成apk环境在项目根目录执行改完又出现这个问题环境win10cocos2dx 3.16 +luaapache-ant-1.10.8android-ndk-r21android-sdkpython2.7java 1.8.0_202在项目根目录执行cocos compile -p android --ap android-22C:/android-ndk-r21/build//…/build/core/add-application.mk:17...

环境

  • 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