Issue
I'm getting below error when I ran espresso test getting below,
java.lang.NoSuchMethodError: No virtual method get()Lokhttp3/Request$Builder; in class Lokhttp3/Request$Builder; or its super classes (declaration of 'okhttp3.Request$Builder' appears in /data/app/appXXX.debug-2/base.apk:classes3.dex)
I'm trying to connect to rest endpoint through espresso to get the configuration.
My build.gradle configuration is as below,
implementation 'com.squareup.okhttp3:okhttp:3.9.1'
androidTestImplementation 'com.squareup.okhttp3:okhttp:3.9.1'
Solution
Problem was proguard was removing okhttp3 unused classes. Updated the proguard config to keep okhttp3 files and it's working like charm!
Answered By - user9187
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.