本文主要是介绍[已解决]讯飞集成的时候遇到“组件未安装.(错误码:21002)”,couldn't find libmsc.so,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
讯飞集成的时候遇到“组件未安装.(错误码:21002)”,
E/MscSpeechLog: loadLibrary msc error:java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.kodulf.mywakeupdemo-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libmsc.so"
05-05 23:04:14.343 20721-20721/com.example.kodulf.mywakeupdemo E/MscSpeechLog: loadLibrary msc error:java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.kodulf.mywakeupdemo-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libmsc.so"
05-05 23:04:14.343 20721-20721/com.example.kodulf.mywakeupdemo D/MscSpeechLog: MSC ifly ver: true
05-05 23:04:14.344 20721-20721/com.example.kodulf.mywakeupdemo E/MscSpeechLog: init failed
05-05 23:04:14.344 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: 组件未安装.(错误码:21002)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at com.iflytek.cloud.SpeechUtility.<init>(Unknown Source)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at com.iflytek.cloud.SpeechUtility.createUtility(Unknown Source)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at com.example.kodulf.mywakeupdemo.MainActivity.onCreate(MainActivity.java:27)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at android.app.Activity.performCreate(Activity.java:6010)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at android.app.ActivityThread.access$800(ActivityThread.java:155)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at android.os.Looper.loop(Looper.java:135)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5343)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at java.lang.reflect.Method.invoke(Native Method)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at java.lang.reflect.Method.invoke(Method.java:372)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
05-05 23:04:14.345 20721-20721/com.example.kodulf.mywakeupdemo W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
05-05 23:04:14.353 20721-20745/com.example.kodulf.mywakeupdemo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
so包找不到,这个是因为so包,我放在了libs 的文件夹下面了
解决办法:
应该将so文件都放在main下面的jniLibs下面,如果没有这个文件夹,那么手动的创建
这篇关于[已解决]讯飞集成的时候遇到“组件未安装.(错误码:21002)”,couldn't find libmsc.so的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!