无法加载游戏:findLibrary返回null:与cocos2d的-X,尽管多次尝试没有成功? [英] Couldn't load game: findLibrary returned null: with cocos2d-x, no success despite many attempts?
问题描述
我想使用Eclipse移动对于开发商来说,NDK,Android SDK中,和Cocos2d-X尝试一个简单的项目。
I would like to try a simple project using Eclipse Mobile For Developers, the NDK, Android SDK, and Cocos2d-x.
我已经正确设置了路径:cocos2d的-X / create-android-project.sh:
I have correctly set the paths in: cocos2d-x/create-android-project.sh :
NDK_ROOT_LOCAL="/Users/Empon/android-ndk-r8e"
ANDROID_SDK_ROOT_LOCAL="/Users/Empon/android"
和在Eclipse(NDK路径,从属性)的设置
and in the settings in Eclipse ("NDK path" from the Properties).
我跟着计算器的主题,但我不能让我的项目工作。有一件事相比,一个题目说似乎有些奇怪:我没有下面的库
I followed the topics in stackoverflow but I can't make my project work. One thing that seems strange compared to one topic: I don't have anything below "libs".
我在Mac狮子10.7.4(我下载的是Eclipse的64位版本),我有项目中没有错误,唯一的错误是,当我运行在Android(4.0.4,阿尔卡特OT 997)应用程序,这些错误(这里是2企图摘要):
I am on Mac Lion 10.7.4 (I downloaded the 64bit version of Eclipse), I have got no error in the project, the only errors are when I run the app on android (4.0.4, Alcatel ot 997), with these errors (here is a summary from 2 attempts):
04-22 22:19:09.079: E/AndroidRuntime(14321): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load game: findLibrary returned null
04-22 22:19:09.079: E/AndroidRuntime(14321): at java.lang.Runtime.loadLibrary(Runtime.java:365)
04-22 22:19:09.079: E/AndroidRuntime(14321): at java.lang.System.loadLibrary(System.java:535)
04-22 22:19:09.079: E/AndroidRuntime(14321): at com.first.cocos2dx.samplecocos2dxandroid.<clinit>(samplecocos2dxandroid.java:37)
你知道这事?
非常感谢
(来源: HTTP:// WWW .raywenderlich.com / 11283 / cocos2d的-X换IOS-和Android的工具入门)
编辑:
我现在有这个问题,正确出口NDK_ROOT后: NDK的构建:没有这样的文件或目录
I have this issue now, after exporting correctly NDK_ROOT : ndk-build: No such file or directory
!
出口NDK_ROOT = /用户/ Empon / Android的NDK-R8E / NDK的构建:没有这样的文件或目录
export NDK_ROOT=/Users/Empon/android-ndk-r8e/ndk-build: No such file or directory
但该文件确实在 Android的NDK-R8E存在
...所以,我双击该文件,它说定义NDK_PROJECT_PATH变量
:
But the file does exist in android-ndk-r8e
... so, I double clicked on the file, it said define the NDK_PROJECT_PATH variable
:
Empon$ /Users/Empon/android-ndk-r8e/ndk-build ; exit;
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
/Users/Empon/android-ndk-r8e/build/core/build-local.mk:130: *** Android NDK: Aborting
我已经在终端尝试这样:
I have tried this in the Terminal :
在终端:
Empon$ export NDK_PROJECT_PATH=/Users/Empon/cocos2d-x/Monday3/ >> .bash_profile
Empon$ ./build_native.sh
NDK_ROOT = :/Users/Empon/android-ndk-r8e >> .bash_profile
export NDK_ROOT=/Users/Empon/android-ndk-r8e
COCOS2DX_ROOT = /Users/Empon/cocos2d-x/Monday3/proj.android/../..
APP_ROOT = /Users/Empon/cocos2d-x/Monday3/proj.android/..
APP_ANDROID_ROOT = /Users/Empon/cocos2d-x/Monday3/proj.android
Using prebuilt externals
./build_native.sh: line 89: :/Users/Empon/android-ndk-r8e >> .bash_profile
export NDK_ROOT=/Users/Empon/android-ndk-r8e/ndk-build: No such file or directory
或者只是改变在Android.mk的路径:
or just change the path in Android.mk :
#LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes
LOCAL_C_INCLUDES := $(LOCAL_PATH)/Classes
但还是同样的错误与终端...任何想法?
But still the same error with the Terminal... Any idea?
推荐答案
我觉得你没有运行build_native.sh脚本
I think you didn't run the build_native.sh script
这篇关于无法加载游戏:findLibrary返回null:与cocos2d的-X,尽管多次尝试没有成功?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!