Java.lang.nosuchmethoderror: No Static Method Registerdefaultinstance With Firebase Performance And Espresso Instrumented Tests
When I adding implementation 'com.google.firebase:firebase-perf-ktx:19.1.0' I cannot start espresso instrumented tests ('app' scheme building ok). When I trying to start Espresso t
Solution 1:
In my case it seems to be caused by protobuf-lite:3.0.1
dependency from recently updated androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.4.0'
which I was able to fix with this exclude
androidTestImplementation (androidx.test.espresso:espresso-contrib:3.4.0'){
exclude module: "protobuf-lite"
}
In case of KTX
testImplementation('androidx.test.espresso:espresso-contrib:3.4.0') {
exclude(module = "protobuf-lite")
}
Solution 2:
It looks like you might need to modify how you specify your dependency and use something like this:
implementation(Deps.Firebase.performance)
{
exclude(group = "com.google.protobuf", module="protobuf-java")
}
Source:
https://github.com/firebase/firebase-android-sdk/issues/1907
Post a Comment for "Java.lang.nosuchmethoderror: No Static Method Registerdefaultinstance With Firebase Performance And Espresso Instrumented Tests"