报错如下,已经在build.gradle加上了
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
,仍然报错,用都不能用。。。。
08-24 21:37:18.170 4311-4311/com.example.linpc.tts D/SpeechContentValues: Current net type: WIFI.
08-24 21:37:18.194 4311-4311/com.example.linpc.tts E/art: No implementation found for long com.nlspeech.nlscodec.NlsCodec2.createEncoder() (tried Java_com_nlspeech_nlscodec_NlsCodec2_createEncoder and Java_com_nlspeech_nlscodec_NlsCodec2_createEncoder__)
08-24 21:37:18.194 4311-4311/com.example.linpc.tts D/AndroidRuntime: Shutting down VM
08-24 21:37:18.194 4311-4311/com.example.linpc.tts E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.linpc.tts, PID: 4311
java.lang.UnsatisfiedLinkError: No implementation found for long com.nlspeech.nlscodec.NlsCodec2.createEncoder() (tried Java_com_nlspeech_nlscodec_NlsCodec2_createEncoder and Java_com_nlspeech_nlscodec_NlsCodec2_createEncoder__)
at com.nlspeech.nlscodec.NlsCodec2.createEncoder(Native Method)
at com.alibaba.idst.nls.internal.codec.OupsCodec.open(OupsCodec.java:123)
at com.alibaba.idst.nls.internal.VoiceCodecs.open(VoiceCodecs.java:21)
at com.alibaba.idst.nls.internal.VoiceActDetector.open(VoiceActDetector.java:117)
at com.alibaba.idst.nls.NlsClient.<init>(NlsClient.java:154)
at com.alibaba.idst.nls.NlsClient.newInstance(NlsClient.java:136)
at com.example.linpc.tts.MainActivity.onCreate(MainActivity.java:58)
at android.app.Activity.performCreate(Activity.java:6303)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2402)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)
at android.app.ActivityThread.access$1000(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5528)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)
08-24 21:37:20.181 4311-4311/com.example.linpc.tts I/Process: Sending signal. PID: 4311 SIG: 9
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。