In our project we are using Unity version - 2022.3.8 and later.
We are creating the Unity-Android export of the project and trying to integrate the library in the native android.
The native android project has the following dependency :
implementation(“com.google.android.play:core:1.10.3”)
After integrating the unity-android library , while building the native android app , we are getting the following JNI error:
we think its due to the fact that “com.google.android.play:core:1.10.3” is a monolithic google play library and the recent versions of unity does not have this monolithic google play libraries. (reference link: play-unity-plugins/README.md at master · google/play-unity-plugins · GitHub)
Can you please help us to resolve the JNI error and any work around to resolve this error.
JNI DETECTED ERROR IN APPLICATION: JNI NewStringUTF called with pending exception java.lang.NoSuchMethodError: No interface method getPackStates(Ljava/util/List;)Lcom/google/android/gms/tasks/Task; in class Lcom/google/android/play/core/assetpacks/AssetPackManager; or its super classes (declaration of ‘com.google.android.play.core.assetpacks.AssetPackManager’ appears in /data/app/~~NZYnXkU85kdXLMVnQ1kNxg==/com.fcagroup.us.knowandgo-byjDWXZYeD7GjF8TeO0Ozw==/base.apk)
at void com.unity3d.player.i.a(java.lang.String, com.unity3d.player.IAssetPackManagerStatusQueryCallback) ((null):-1)
at void com.unity3d.player.PlayAssetDeliveryUnityWrapper.getAssetPackStates(java.lang.String, com.unity3d.player.IAssetPackManagerStatusQueryCallback) ((null):-1)