Java 在android中使用speex编解码器库时出现不满意的链接错误
我对这一主题完全是新手。我想在我的应用程序中使用speex编解码器,因为我遵循了这一点。我已经完成了所有步骤[获取所有c文件并使用NDK编译它们],并运行了以下代码行Java 在android中使用speex编解码器库时出现不满意的链接错误,java,android,codec,speex,Java,Android,Codec,Speex,我对这一主题完全是新手。我想在我的应用程序中使用speex编解码器,因为我遵循了这一点。我已经完成了所有步骤[获取所有c文件并使用NDK编译它们],并运行了以下代码行 static { System.loadLibrary("speex"); } private native void initEncoder(int mode, int quality); private native void destroyEncoder(); private native int encodeFil
static {
System.loadLibrary("speex");
}
private native void initEncoder(int mode, int quality);
private native void destroyEncoder();
private native int encodeFile(String sourcePath, String targetPath);
@
Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initEncoder(AudioManager.ADJUST_RAISE, 5);
File f = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/encoded_file");
encodeFile(Environment.getExternalStorageDirectory().getAbsolutePath() + "/06-Jab Tak Hai Jaan[MusikMaza.Com].mp3", f.getAbsolutePath());
destroyEncoder();
}
我犯了这个错误
11-06 16:21:12.620: E/AndroidRuntime(32612): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load speex: find Library returned null.
我似乎没有按错误名称加载库。因此,请告诉我如何解决此问题。任何建议/帮助都将不胜感激。提前感谢让您在应用程序中生成.So文件。您的*。So libs:\libs\armeabi\libs\armeabi-v7a\?尝试将.So lib放入libs\armeabi-v7a而不是\自由基\armeabi@BhanuSharma:我有libs->armeabi,其中armeabi是空的,obj->local->armeabi->objs->libspeex.sono不,不,亲爱的,你用Cygwin64终端编译然后自动生成.so文件