[英]Can't run Android NDK app on device
I'm trying to start with Android NDK, but I'm in trouble. 我正在尝试从Android NDK开始,但是遇到了麻烦。 I've successfully started the 'hello-jni' sample on the Emulator, but the same .apk file doesn't seem to work on the real device, ie it says:
我已经在仿真器上成功启动了'hello-jni'示例,但是相同的.apk文件似乎无法在实际设备上运行,即它说:
The application HelloJni has stopped unexpectedly.
应用程序HelloJni已意外停止。
Any ideas as to what may the cause be? 关于可能的原因有什么想法?
Thanks a lot! 非常感谢!
I know this question is two years old, but for completeness: 我知道这个问题已有两年历史了,但是为了完整起见:
Looks like you did not build the NDK part of your project. 看来您没有构建项目的NDK部分。 Try the following two lines on your comand line:
在命令行上尝试以下两行:
cd <your_project>
<ndk_root>/ndk-build
After that rebuild your project in eclipse. 之后,在Eclipse中重建您的项目。
That is probably an uncaught UnsatisfiedLinkError. 那可能是未捕获的UnsatisfiedLinkError。 In the log around it you should be able to find a line saying something like "libXXX not found" - some dependency library that is missing on your platform.
在它周围的日志中,您应该能够找到一行内容,例如“找不到libXXX”-平台上缺少某些依赖库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.