square / react-native-square-reader-sdk

React Native Plugin for Square Reader SDK
Apache License 2.0
117 stars 36 forks source link

[Android] java.lang.NoSuchMethodError: No static method createRuntimeMessageAdapter #185

Closed zacdemi closed 2 years ago

zacdemi commented 2 years ago

Describe the issue

I just started getting this issue on Android when attempting to authorizeAsync(). The example project works, but following the sdk instructions leads to this error. Any help here would be appreciated. Thanks.

Error log details:

      java.lang.NoSuchMethodError: No static method createRuntimeMessageAdapter(Ljava/lang/Class;)Lcom/squareup/wire/internal/RuntimeMessageAdapter; in class Lcom/squareup/wire/internal/ReflectionKt; or its super classes (declaration of 'com.squareup.wire.internal.ReflectionKt' appears in /data/app/~~HyqDwPgCiLpLh8WV_LFlwQ==/com.Brushfire.Brushfire.debug-mjqzsnXVvByAfUB2vdiKYA==/base.apk!classes27.dex)
        at com.squareup.wire.WireTypeAdapterFactory.create(WireTypeAdapterFactory.kt:77)
        at com.google.gson.Gson.getAdapter(Gson.java:501)
        at retrofit2.converter.gson.GsonConverterFactory.requestBodyConverter(GsonConverterFactory.java:71)
        at retrofit2.Retrofit.nextRequestBodyConverter(Retrofit.java:304)
        at retrofit2.Retrofit.requestBodyConverter(Retrofit.java:284)
        at retrofit2.RequestFactory$Builder.parseParameterAnnotation(RequestFactory.java:732)
        at retrofit2.RequestFactory$Builder.parseParameter(RequestFactory.java:306)
        at retrofit2.RequestFactory$Builder.build(RequestFactory.java:193)
        at retrofit2.RequestFactory.parseAnnotations(RequestFactory.java:67)
        at retrofit2.ServiceMethod.parseAnnotations(ServiceMethod.java:26)
        at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:192)
        at retrofit2.Retrofit$1.invoke(Retrofit.java:149)
        at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
        at $Proxy6.login(Unknown Source)
        at com.squareup.sdk.reader.authorization.ReaderSdkAuthenticator.login(ReaderSdkAuthenticator.kt:116)
        at com.squareup.sdk.reader.authorization.RealAuthorizationManager.authorize(RealAuthorizationManager.java:109)
        at com.squareup.sdk.reader.react.AuthorizationModule$2.run(AuthorizationModule.java:117)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:246)
        at android.app.ActivityThread.main(ActivityThread.java:8653)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

To Reproduce

Expected behavior

Environment (please complete the following information):

Screenshots

Additional context

CharmisG commented 2 years ago

@zacdemi Sorry for the delay !! Can you please pull latest code it's resolved !!