You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When debugging with this line, inside LiveDataCallAdapterFactoryget method,
String name = returnType.getClass().getName(); //to get full.package.name.of.Cat
Log.i(TAG,"Check#in between:"+name);
Found differences in release and debug apk.
Debug apk printed the log as : Check#in between:libcore.reflect.ParameterizedTypeImpl
Release apk printed the log as : Check#in between:java.lang.Class
Also with breakpoints, I was able to see that, the Type variable was wrapped with a LiveData
So,
Adding -keep class androidx.lifecycle.LiveData { *; }
I am getting two errors
java.lang.IllegalArgumentException: Unable to create call adapter for class androidx.lifecycle.LiveData from the caller.
Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType , which is pointed at the line
if (getRawType(returnType) != LiveData::class.java) { return null }
File :
https://github.com/android/architecture-components-samples/blob/master/GithubBrowserSample/app/src/main/java/com/android/example/github/util/LiveDataCallAdapterFactory.kt
This happens in the release apk.
Recent changes : Added co routine components.
Requesting to explain the issue please.
The text was updated successfully, but these errors were encountered: