报错如下:
原因:
包冲突,版本不一致
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
解决方法:
将两个版本改成 一致即可。
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
原文连接:
android - Get java.lang.NoSuchMethodError, No virtual Method log(ILjava/lang/String;Ljava/lang/Throwable;) - Stack Overflow
又解决一个问题,开心!!!