ryanw3bb/unity-native-toolkit

Unable to run on android

xj42 opened this issue · 0 comments

xj42 commented

I created an empty project and installed this plugin from the unity store.
Unity version 2018.3.0f2
Min SDK 16
Target SDK 28
Unity default build settings

Installed on Samsung s5 android 8.0

The application crashes on boot with the error below.

01-11 10:26:46.598 860 6620 V WindowManager: addAppToken: AppWindowToken{3bd3d8 token=Token{6a182bb ActivityRecord{54e34a u0 com.Company.test/com.unity3d.player.UnityPlayerNativeActivity t128}}} to stack=1 task=128 at 0
01-11 10:26:46.618 860 2180 I ActivityManager: Start proc 5094:com.Company.test/u0a197 for activity com.Company.test/com.unity3d.player.UnityPlayerNativeActivity
01-11 10:26:46.838 5094 5094 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.Company.test/com.unity3d.player.UnityPlayerNativeActivity}: java.lang.ClassNotFoundException: Didn't find class "com.unity3d.player.UnityPlayerNativeActivity" on path: DexPathList[[zip file "/data/app/com.Company.test-1/base.apk"],nativeLibraryDirectories=[/data/app/com.Company.test-1/lib/arm, /data/app/com.Company.test-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
01-11 10:26:46.838 5094 5094 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.unity3d.player.UnityPlayerNativeActivity" on path: DexPathList[[zip file "/data/app/com.Company.test-1/base.apk"],nativeLibraryDirectories=[/data/app/com.Company.test-1/lib/arm, /data/app/com.Company.test-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
01-11 10:26:46.838 5094 5094 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: com.unity3d.player.UnityPlayerNativeActivity
01-11 10:26:46.848 860 4023 W ActivityManager: Force finishing activity com.Company.test/com.unity3d.player.UnityPlayerNativeActivity
01-11 10:26:47.378 860 1194 W ActivityManager: Activity pause timeout for ActivityRecord{54e34a u0 com.Company.test/com.unity3d.player.UnityPlayerNativeActivity t128 f}
01-11 10:26:48.668 5318 5318 D RCP_PackageUpdateReceiver: Update Class Name :com.unity3d.player.UnityPlayerNativeActivity

If I change the AndroidManifest.xml

to

The application will boot, but the error below occurs for each button.

01-11 10:32:32.238 6869 6869 D RCP_PackageUpdateReceiver: Update Class Name :com.unity3d.player.UnityPlayerActivity
01-11 10:32:32.718 6652 6652 V ActivityThread: updateVisibility : ActivityRecord{ecdf274 token=android.os.BinderProxy@8e9215f {com.Company.test/com.unity3d.player.UnityPlayerActivity}} show : true
01-11 10:32:35.308 860 1195 D StatusBarManagerService: manageDisableList userId=0 what=0x0 pkg=Window{5f3fdc u0 d0 com.Company.test/com.unity3d.player.UnityPlayerActivity}
01-11 10:32:35.988 6652 6676 E Unity : AndroidJavaException: java.lang.ClassNotFoundException: com.secondfury.nativetoolkit.Main
01-11 10:32:35.988 6652 6676 E Unity : java.lang.ClassNotFoundException: com.secondfury.nativetoolkit.Main
01-11 10:32:35.988 6652 6676 E Unity : at java.lang.Class.classForName(Native Method)
01-11 10:32:35.988 6652 6676 E Unity : at java.lang.Class.forName(Class.java:324)
01-11 10:32:35.988 6652 6676 E Unity : at java.lang.Class.forName(Class.java:285)
01-11 10:32:35.988 6652 6676 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
01-11 10:32:35.988 6652 6676 E Unity : at com.unity3d.player.UnityPlayer.c(Unknown Source)
01-11 10:32:35.988 6652 6676 E Unity : at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source)
01-11 10:32:35.988 6652 6676 E Unity : at android.os.MessageQueue.next(MessageQueue.java:392)
01-11 10:32:35.988 6652 6676 E Unity : at android.os.Looper.loop(Looper.java:143)
01-11 10:32:35.988 6652 6676 E Unity : at com.unity3d.player.UnityPlayer$e.run(Unknown Source)
01-11 10:32:35.988 6652 6676 E Unity : Caused by: java.lang.ClassNotFoundException: Didn't find class "com.secondfury.nativetoolkit.Main" on path: DexPathList[[zip file "/data/app/com.Company.test-2/base.apk"],nat iveLibraryDirectories=[/data/app/com.Company.test-2/lib/arm, /data/app/com.Company.test-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
01-11 10:32:35.988 6652 6676 E Unity : at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56
01-11 10:32:39.948 6652 6676 E Unity : NullReferenceException: Object reference not set to an instance of an object
01-11 10:32:39.948 6652 6676 E Unity : at NativeToolkit.ShowAlert (System.String title, System.String message, System.Action`1[T] callback, System.String btnText) [0x00019] in <7a8cbf0d28984f9ea8d7b493c4588443>: 0
01-11 10:32:39.948 6652 6676 E Unity : at NativeToolkitExample.OnShowAlertPress () [0x00000] in <7a8cbf0d28984f9ea8d7b493c4588443>:0
01-11 10:32:39.948 6652 6676 E Unity : at UnityEngine.Events.InvokableCall.Invoke () [0x00011] in <004fc436a9154f7fab4df9679445af6c>:0
01-11 10:32:39.948 6652 6676 E Unity : at UnityEngine.Events.UnityEvent.Invoke () [0x00023] in <004fc436a9154f7fab4df9679445af6c>:0
01-11 10:32:39.948 6652 6676 E Unity : at UnityEngine.UI.Button.Press () [0x00027] in :0
01-11 10:32:39.948 6652 6676 E Unity : at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00011] in :0
01-11 10:32:39.948 6652 6676 E Unity : at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00008] in <d8

Any Idea?