aljohnston112
aljohnston112
This might help https://scans.gradle.com/s/k7h3cqmbgvwkm
Ah, so if I remove Jacoco related stuff, I still get the same error
I forced Jacoco version 0.8.7 and see all Jacoco related dependencies are 0.8.7 in buildEnvironment
compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } Whatever version that is.
I cleaned up my dependencies ``` implementation "androidx.navigation:navigation-fragment-ktx:2.4.2" implementation "androidx.navigation:navigation-ui-ktx:2.4.2" implementation "androidx.recyclerview:recyclerview:1.2.1" implementation "androidx.recyclerview:recyclerview-selection:1.1.0" implementation 'com.google.android.material:material:1.6.1' implementation 'com.google.dagger:hilt-android:2.42' kapt 'com.google.dagger:hilt-compiler:2.42' testImplementation "androidx.arch.core:core-testing:2.1.0" androidTestImplementation "androidx.arch.core:core-testing:2.1.0" androidTestImplementation 'androidx.test:core-ktx:1.4.0' androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.3' androidTestImplementation 'androidx.test:runner:1.4.0'
I am pretty sure it is related to ActivityScenario because I use AndroidJUnit4 on other tests and they work. Same with org.junit.Test and org.junit.runner.RunWith
So actually, you do not even need to follow the steps in the link I posted. You just need the dependencies and testCoverageEnabled set to true. This build scan is...
Here is a minimal reproducible example https://github.com/aljohnston112/TestJacocoBug/tree/main
Looks like a bug with ActivityScenario or AppCompatActivity. I think there is some kind of conflict between 'androidx.test:core-ktx:1.4.0' and 'com.google.android.material:material:1.6.1'.
Replacing the Material dependency with 'androidx.appcompat:appcompat:1.4.1' does not help