Caused by: java.lang.NoSuchMethodError:No virtual method isSuccess()Z in class Lretrofit2/Response;

 

异常:

Caused by: java.lang.NoSuchMethodError: No virtual method isSuccess()Z in class Lretrofit2/Response; or its super classes (declaration of 'retrofit2.Response' appears in /data/data/com.hengda.smart.retrofitdemo/files/instant-run/dex/slice-retrofit-2.1.0_57685673f22b56e418e8e207266994b062f49604-classes.dex)


原因:

retrofit跟rxjava版本不一致导致的


解决:

版本统一

compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.3.0'


retrofit最新版本查看:http://square.github.io/retrofit/



你可能感兴趣的:(Android,疑难杂症)