
<Meta-data androID:name="androID.app.lib_name" androID:value="cocos2dcpp" />Cocos2dxActivity.java中的onLoadNativelibrarIEs下读取AndroIDManifest下配置的Meta值后进行.so库的加载 @H_301_2@
protected voID onLoadNativelibrarIEs() { try { ApplicationInfo ai = getPackageManager().getApplicationInfo(getPackagename(),PackageManager.GET_Meta_DATA); Bundle bundle = ai.MetaData; String libname = bundle.getString("androID.app.lib_name"); System.loadlibrary(libname); } catch (Exception e) { e.printstacktrace(); } } @H_301_2@ java.lang.UnsatisfiedLinkError: dlopen failed:unknown reloc type 160 from: http://developer.adca.sh/article/plugins-androID/cocos/1-0-0-cocos/cocos2d-x/ In case you set up your environment withanother version of NDKthan the recommended one (r9d) and got an error on launching the app:
2 | unkNown reloc type 160 |
You can try modifying the~/Projects/MyGame/cocos2d/plugin/protocols/proj.androID/jni/Application.mkfile with the following:
APP_STL := c++_static |
| 4 | APP_STL := gnustl_static |
# from:APP_STL := c++_static# to:APP_STL := gnustl_static NDK_TOolCHAIN_VERSION=clangAPP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-charAPP_LDFLAGS := -latomicTARGET_cpu_API := armeabiAPP_ABI := armeabiAPP_DEBUG := $(strip $(NDK_DEBUG))ifeq ($(APP_DEBUG),1) APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 APP_OPTIM := deBUGelse APP_CPPFLAGS += -DNDEBUG APP_OPTIM := releaseendif总结
以上是内存溢出为你收集整理的记cocos2dx 3.2版本打包的一些注意事项全部内容,希望文章能够帮你解决记cocos2dx 3.2版本打包的一些注意事项所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)