简体   繁体   中英

java.lang.NoSuchMethodError no non-static method with name='getStatusCode' signature='()I' in class Ljava.lang.Object;

Really struggling with this error for our unity game. Our game has firebase and GPGS which we suspect is related but not sure where to look for this.

Anybody had similar or can give us some pointers as to where to look or what is happening. (i can't reproduce on my android devices)

Managed Stack Trace:

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)

Try this:

  1. put your jar|arr librarys into Unity Path:Assets/Plugins/Android/ .
  2. Change Unity Configs. Build Settings --> Build System ,select Internal .

When I select Gradle, I had the same error you had, and don't know why. I even had a gradle file in the path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question java.lang.NoSuchMethodError: No static method registerDefaultInstance with Firebase Performance and Espresso Instrumented Tests : java.lang.NoSuchMethodError: com.amazonaws.services.s3.transfer.TransferManager.<init>(S3;Ljava/util/concurrent/ThreadPoolExecutor;)V java.lang.NoSuchMethodError: 'boolean com.google.api.client.http.HttpTransport.isMtls() AWS EMR cluster with Flink does not run any Jar, instead gives java.lang.NoSuchMethodError Twilio | Wso2 : ERROR {NativeWorkerPool} - Uncaught exception java.lang.NoSuchMethodError java.lang.NoSuchMethodError: 'com.microsoft.aad.msal4j.SilentParameters$SilentParametersBuilder using azure sdk for java service bus Runtime Exception java.lang.NoSuchMethodError: com.google.common.base.Optional.toJavaUtil()L with Spark-BigQuery connector java.lang.NoSuchMethodError: 'com.google.api.gax.rpc.StubSettings$Builder com.google.cloud.pubsub.v1.stub.SubscriberStubSettings$Builder.setBackground java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference py4j.Py4JException: Method set([class java.lang.String, class java.util.ArrayList]) does not exist in Databricks
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM