AndroidJavaException: java.lang.ClassNotFoundException: kokosoft.unity.speechrec

Welcome! Forums Unity Plugins Mobile Speech Recognizer AndroidJavaException: java.lang.ClassNotFoundException: kokosoft.unity.speechrec

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11794
    plam
    Participant

    Hello,
    I’m making game using this asset.
    In Android Device, When I go to scene that uses the recognizer, The application not working by getting error.

    I got error below by Android logcat.
    ==================================================
    2021/05/27 00:33:06.812 3519 3552 Error Unity AndroidJavaException: java.lang.ClassNotFoundException: kokosoft.unity.speechrecognition.SpeechRecognizerBridge
    2021/05/27 00:33:06.812 3519 3552 Error Unity java.lang.ClassNotFoundException: kokosoft.unity.speechrecognition.SpeechRecognizerBridge
    2021/05/27 00:33:06.812 3519 3552 Error Unity at java.lang.Class.classForName(Native Method)
    2021/05/27 00:33:06.812 3519 3552 Error Unity at java.lang.Class.forName(Class.java:453)
    2021/05/27 00:33:06.812 3519 3552 Error Unity at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    2021/05/27 00:33:06.812 3519 3552 Error Unity at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
    2021/05/27 00:33:06.812 3519 3552 Error Unity at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
    2021/05/27 00:33:06.812 3519 3552 Error Unity at android.os.Handler.dispatchMessage(Handler.java:102)
    2021/05/27 00:33:06.812 3519 3552 Error Unity at android.os.Looper.loop(Looper.java:164)
    2021/05/27 00:33:06.812 3519 3552 Error Unity at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    2021/05/27 00:33:06.812 3519 3552 Error Unity Caused by: java.lang.ClassNotFoundException: Didn’t find class “kokosoft.unity.speechrecognition.SpeechRecognizerBridge” on path: DexPathList[[zip file “/data/app/myappname==/base.apk”],nativeLibraryDirectories=[/data/app/myappname==/lib/arm64, /data/app/myappname
    =========================================================

    The Point I think is below,

    ・A few days ago, It worked.
    ・In these days, I set Firebase Firestore In my project that has a lot of aar file in Plugins/Android directory. So I need file resolve in many times.
    ・Unity version is now 2020.3.9f1. A few days ago, It was 2020.3.3f1.
    ・Reimporting this asset In many times.(I read the post #2277)
    ・In AndroidManifest.xml file that I got importing this asset, I deleted words ‘ android:banner=”@drawable/app_banner”‘ because building my project is failed by not deleting this. And When I delete this, the build is succeeded.
    ・When I go to scene using this asset, now always this error occurred.
    ・In Unity Player Settings, …
     ┗ I checked Build_Custom Main Manifest in Publishing Settings to use My AndroidManifest file that I said above.
     ┗ I checked Custom Proguard File by using Firebase Firestore.
     ┗ I checked Minify Release.

    That’s all.
    Any Suggestions?
    Thank you for your help.

    • This topic was modified 3 years, 5 months ago by PiotrPiotr.
    #11797
    PiotrPiotr
    Keymaster

    My guess proguard is changing plugin class names. Try adding rule which will skip minification for any kokosoft.* classes.

    #11798
    plam
    Participant

    Obfuscation?

    Yes, you are right.

    I fixed it!

    Thank you so much to save my time.

    Your support is very good.

    I will check 5 star for your asset soon In Asset Store. Thank you.

    #11799
    cath690
    Participant

    I ham having the same problem for preciseLocale after adding ProGuard to build, I have tried to add class exclusion to ProGuard file but must be getting formal wrong as it is not working . Can you provide me with the exclusion lines to add to custom ProGuard file thanks

    #11800
    PiotrPiotr
    Keymaster

    Glad it worked! 🙂
    Thank you.

    What did you try cath690?

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.