简体   繁体   English

UnsatisfiedLinkError无法加载游戏-Android上的cocos2d-x

[英]UnsatisfiedLinkError couldn't load game - cocos2d-x on Android

I am trying to create a new cocos2d-x Project for Android and followed the following tutorial: Cocos2d-x Android Integration 我正在尝试为Android创建一个新的cocos2d-x项目,并遵循以下教程: Cocos2d-x Android集成

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. 但是我的项目中没有game.so。 I only have libgame.so What should I do to solve this issue? 我只有libgame.so,该怎么办才能解决此问题?

Where did you place your .so file? 您将.so文件放在哪里? Make sure it is under "libs" and maybe even "libs/armeabi" or "libs/armeabi-v7". 确保它在“ libs”下,甚至在“ libs / armeabi”或“ libs / armeabi-v7”下。 If it already has a v7, try deleting it. 如果已经有v7,请尝试将其删除。

the naming convention for android turns libgame.so into "game" for loadlibrary .. your naming is correct android的命名约定将libgame.so变成loadlibrary的“游戏” ..您的命名是正确的

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!) 还请确保您使用NDK构建了该库,或者该“游戏”的生产者也使用NDK构建了该库(顾名思义,好像是这样!)

Seems like your having a 64-bit issue that can be found here 好像您有一个64位问题,可以在这里找到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM