안드로이드에서 유니티 패키지 UniWebView가 동작하지 않는 문제

vvhustle's coding note·2022년 11월 22일
0
AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/onevcat/uniwebview/UniWebViewInterface$Companion$prepare$1;
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/onevcat/uniwebview/UniWebViewInterface$Companion$prepare$1;
com.onevcat.uniwebview.UniWebViewInterface$Companion.prepare(UniWebViewInterface.kt:18)
com.onevcat.uniwebview.UniWebViewInterface.prepare(Unknown Source:2)
com.unity3d.player.UnityPlayer.nativeRender(Native Method)
com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:246)
com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
Caused by: java.lang.ClassNotFoundException: com.onevcat.uniwebview.UniWebViewInterface$Companion$prepare$1
... 8 more
UnityEngine.AndroidJNISafe.CheckException () (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) (at <00000000000000000000000000000000>:0)
UniWebView.Awake () (at <00000000000000000000000000000000>:0)
UnityEngine.Object.Instantiate[T] (T original) (at <00000000000000000000000000000000>:0)
Dorothy.UI.Popup.PopupSystem+<LoadPopups>d__27.MoveNext () (at <00000000000000000000000000000000>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0)
Rethrow as TypeInitializationException: The type initializer for 'UniWebViewInterface' threw an exception.
UniWebView.Awake () (at <00000000000000000000000000000000>:0)
UnityEngine.Object.Instantiate[T] (T original) (at <00000000000000000000000000000000>:0)
Dorothy.UI.Popup.PopupSystem+<LoadPopups>d__27.MoveNext () (at <00000000000000000000000000000000>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0)
UnityEngine.Object:Instantiate(T)
Dorothy.UI.Popup.<LoadPopups>d__27:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
com.onevcat.uniwebview.UniWebViewInterface$Companion.hide(Unknown Source:2)
com.onevcat.uniwebview.UniWebViewInterface.hide(Unknown Source:7)
com.unity3d.player.UnityPlayer.nativeRender(Native Method)
com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:246)
com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
... 8 more
UnityEngine.AndroidJNISafe.CheckException () (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJNISafe.CallStaticBooleanMethod (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJavaObject._CallStatic[ReturnType] (System.String methodName, System.Object[] args) (at <00000000000000000000000000000000>:0)
UniWebViewInterface.Hide (System.String name, System.Boolean fade, System.Int32 edge, System.Single duration, System.String identifier) (at <00000000000000000000000000000000>:0)
UniWebView.Hide (System.Boolean fade, UniWebViewTransitionEdge edge, System.Single duration, System.Action completionHandler) (at <00000000000000000000000000000000>:0)
Dorothy.UI.Popup.PopupWebView.OnDisable () (at <00000000000000000000000000000000>:0)
Dorothy.UI.Popup.PopupSystem+<LoadPopups>d__27.MoveNext () (at <00000000000000000000000000000000>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0)
Dorothy.UI.Popup.<LoadPopups>d__27:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
com.onevcat.uniwebview.UniWebViewInterface$Companion.setFrame(Unknown Source:2)
com.onevcat.uniwebview.UniWebViewInterface.setFrame(Unknown Source:7)
com.unity3d.player.UnityPlayer.nativeRender(Native Method)
com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:246)
com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
... 8 more
UnityEngine.AndroidJNISafe.CheckException () (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) (at <00000000000000000000000000000000>:0)
UniWebViewInterface.SetFrame (System.String name, System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height) (at <00000000000000000000000000000000>:0)
UniWebView.UpdateFrame () (at <00000000000000000000000000000000>:0)
Dorothy.UI.Popup.PopupWebView.SetUI () (at <00000000000000000000000000000000>:0)
Dorothy.UI.Popup.PopupWebView.Initialize (System.String url, UnityEngine.Vector4 insets, System.Single timeout) (at <00000000000000000000000000000000>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <00000000000000000000000000000000>:0)
Dorothy.UI.Popup.PopupSystem+<LoadPopups>d__27.MoveNext () (at <00000000000000000000000000000000>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <00000000000000000000000000000000>:0)
Dorothy.UI.Popup.PopupSystem+<LoadPopups>d__27.MoveNext () (at <00000000000000000000000000000000>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <00000000000000000000000000000000>:0)

해결책:

런타임에 코틀린 추가하지 않아서 발생한 문제였습니다. (fb sdk 11에서 코틀린을 내장하고 있어서 제거했지만 fb sdk 9로 다운그레이드하면서 코틀린이 빠지게 되었음.)

0개의 댓글