java.lang.nosuchmethoderror类ljava.lang.object中没有name='getstatuscode'signature='()i'的非静态方法;

b4qexyjb  于 2021-07-06  发布在  Java
关注(0)|答案(1)|浏览(771)

真的在为我们的团结游戏纠结这个错误。我们的游戏有firebase和GPG,我们怀疑是相关的,但不知道在哪里可以找到这个。
任何人都有类似的或可以给我们一些指针,看看在哪里或正在发生什么(我无法在android设备上复制)
托管堆栈跟踪:

java.lang.NoSuchMethodError: no non-static method with name='getStatusCode' signature='()I' in class 
Ljava.lang.Object;
com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source)
com.unity3d.player.ReflectionHelper.nativeProxyInvoke(Native Method)
com.unity3d.player.ReflectionHelper.a(Unknown Source)
com.unity3d.player.ReflectionHelper$1.invoke(Unknown Source)
java.lang.reflect.Proxy.invoke(Proxy.java:813)
$Proxy14.onFailure(Unknown Source)
com.google.android.gms.tasks.zzk.run(com.google.android.gms:play-services-tasks@@17.1.0:4)
android.os.Handler.handleCallback(Handler.java:751)
android.os.Handler.dispatchMessage(Handler.java:95)
com.google.android.gms.internal.tasks.zzb.dispatchMessage(com.google.android.gms:play-services- 
tasks@@17.1.0:6)
android.os.Looper.loop(Looper.java:154)
android.app.ActivityThread.main(ActivityThread.java:6776)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
UnityEngine.AndroidJNISafe.CheckException () (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJNISafe.CallStaticObjectMethod (System.IntPtr clazz, System.IntPtr methodID, 
UnityEngine.jvalue[] args) (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidReflection.GetMethodMember (System.IntPtr jclass, System.String methodName, 
System.String signature, System.Boolean isStatic) (at <00000000000000000000000000000000>:0)
UnityEngine._AndroidJNIHelper.GetMethodID (System.IntPtr jclass, System.String methodName, 
System.String signature, System.Boolean isStatic) (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJNIHelper.GetMethodID (System.IntPtr javaClass, System.String methodName, 
System.String signature, System.Boolean isStatic) (at <00000000000000000000000000000000>:0)
UnityEngine._AndroidJNIHelper.GetMethodID[ReturnType] (System.IntPtr jclass, System.String 
methodName, System.Object[] args, System.Boolean isStatic) (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJNIHelper.GetMethodID[ReturnType] (System.IntPtr jclass, System.String methodName, 
System.Object[] args, System.Boolean isStatic) (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJavaObject._Call[ReturnType] (System.String methodName, System.Object[] args) (at 
<00000000000000000000000000000000>:0)
GooglePlayGames.Android.AndroidClient+<>c__DisplayClass49_0.<AddOnFailureListenerWithSignOut>b__0 
(UnityEngine.AndroidJavaObject exception) (at <00000000000000000000000000000000>:0)
System.Action`1[T].Invoke (T obj) (at <00000000000000000000000000000000>:0)
GooglePlayGames.Android.AndroidTaskUtils+TaskOnFailedProxy.onFailure (UnityEngine.AndroidJavaObject 
exception) (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)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at 
<00000000000000000000000000000000>:0)
UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args) (at 
<00000000000000000000000000000000>:0)
UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, 
System.IntPtr jmethodName, System.IntPtr jargs) (at <00000000000000000000000000000000>:0)
Rethrow as TargetInvocationException: 
GooglePlayGames.Android.AndroidTaskUtils+TaskOnFailedProxy.onFailure(UnityEngine.AndroidJavaObject)
UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args) (at 
<00000000000000000000000000000000>:0)
UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, 
System.IntPtr jmethodName, System.IntPtr jargs) (at <00000000000000000000000000000000>:0)
k5ifujac

k5ifujac1#

试试这个:
把你的 jar|arr 图书馆进入 Unity Path:Assets/Plugins/Android/ .
更改统一配置。 Build Settings --> Build System ,选择 Internal .
当我选择gradle时,我犯了和你一样的错误,不知道为什么。我甚至在路径上有一个gradle文件。

相关问题