UnsatisfiedLinkError couldn't load game - cocos2d-x on Android

送分小仙女□ 提交于 2020-01-03 17:49:52

问题


I am trying to create a new cocos2d-x Project for Android and followed the following tutorial: Cocos2d-x Android Integration

At the end, I get an error when I try to run the application stating:

10-14 21:52:37.510: E/AndroidRuntime(1568): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load game: findLibrary returned null

The "game" library is loaded from the generated activity:

         System.loadLibrary("game");

But there isn't anything in my project as game.so. I only have libgame.so What should I do to solve this issue?


回答1:


Where did you place your .so file? Make sure it is under "libs" and maybe even "libs/armeabi" or "libs/armeabi-v7". If it already has a v7, try deleting it.

the naming convention for android turns libgame.so into "game" for loadlibrary .. your naming is correct

also make sure that you built this library with NDK or the producers of this "game" build the library with NDK (which by the naming, seems like it was!)

Seems like your having a 64-bit issue that can be found here



来源:https://stackoverflow.com/questions/12886004/unsatisfiedlinkerror-couldnt-load-game-cocos2d-x-on-android

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