导入的Android NDK项目(以德code OGG) [英] Importing Android NDK projects (to decode OGG)
问题描述
我试图去在Android中使用NDK项目code OGG文件,(我试过几个)。不管我是哪一个,当我建我总是得到类似这样的错误:
I am trying to decode OGG files in Android using an NDK project (I've tried a few). No matter which one I try, I always get an error similar to this when I build:
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load videokit: findLibrary returned null
我很新的NDK(明显),所以我不知道我做错了。所有我想要做的是能设置一个OGG文件的播放速度。
I'm very new to the NDK (obviously) so I'm not sure what I'm doing wrong. All I want to do is to be able to set the playback rate of an OGG file.
推荐答案
在code链接到共享库对象(.so文件),这是由编译的C ++的/ NDK部分所获得的Java的一部分code。与NDK的构建。在这种情况下,你的应用程序是不是能够找到.so文件正确加载。在这里,你可以检查一些东西 -
The java part of the code links to a shared library object (.so file), which is obtained by compiling the C++/NDK parts of the code with ndk-build. In this case, your app is not able to find the right .so file to load. Here are a few things you could check for -
- 非常基本的检查 - 你运行NDK-打造JNI文件夹内?如果你没有,不产生.so文件 - 月食仍将编译你的项目,但它不会工作
- 如果你的项目的根目录是检查项目的$(PROJECT)/ JNI /库/ armeabi或$(PROJECT)/ JNI /库/ armeabi-V7A - 其中一个或两个地点应该包含一个.so文件,一旦你与NDK的构建命令完成。
- 检查此.so文件在你的java code在某个地方,你调用的System.loadLibrary。
我觉得应该是的System.loadLibrary(videokit),但我不知道。
这篇关于导入的Android NDK项目(以德code OGG)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!