UnsatisfiedLinkError could not load the game - cocos2d-x on Android

I am trying to create a new cocos2d-x project for Android and follow the following guide: Cocos2d-x Android Integration

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

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

The library of "games" is loaded from the generated action:

  System.loadLibrary("game"); 

But in my project there is nothing like game.so. I only have libgame.so What should I do to solve this problem?

+4
source share
1 answer

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

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

also make sure you create this library with the NDK or the producers of this "game", create the library with the NDK (which by name, it seems, was!)

It seems that you have a 64-bit issue that can be found here

+2
source

Source: https://habr.com/ru/post/1439686/


All Articles