We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, thanks for the library. Recently I have faced with crash.
Steps to reproduce: add suspend function into ApiInterface
suspend
Looks like problem in this code block and method getTypeName not available on Android:
getTypeName
private fun isSuspendMethodWithListReturnValue(method: Method): Boolean { val lastParameter = method.genericParameterTypes.lastOrNull() as? ParameterizedType ?: return false if (!Continuation::class.java.isAssignableFrom(Class.forName(lastParameter.rawType.typeName))) { return false } }
Crash log:
Process: com.theapache64.notes, PID: 29094 java.lang.NoSuchMethodError: No interface method getTypeName()Ljava/lang/String; in class Ljava/lang/reflect/Type; or its super classes (declaration of 'java.lang.reflect.Type' appears in /system/framework/core-oj.jar) at com.github.theapache64.retrosheet.RetrosheetInterceptor$Companion.isSuspendMethodWithListReturnValue(RetrosheetInterceptor.kt:89) at com.github.theapache64.retrosheet.RetrosheetInterceptor$Companion.isReturnTypeList(RetrosheetInterceptor.kt:66) at com.github.theapache64.retrosheet.RetrosheetInterceptor$Companion.access$isReturnTypeList(RetrosheetInterceptor.kt:38) at com.github.theapache64.retrosheet.RetrosheetInterceptor.getRetrosheetResponse(RetrosheetInterceptor.kt:225) at com.github.theapache64.retrosheet.RetrosheetInterceptor.intercept(RetrosheetInterceptor.kt:169) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:172) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, thanks for the library.
Recently I have faced with crash.
Steps to reproduce: add
suspend
function into ApiInterfaceLooks like problem in this code block and method
getTypeName
not available on Android:Crash log:
The text was updated successfully, but these errors were encountered: