Mentioned issues (1)
NoClassDefFoundError: androidx/fragment/testing/R$style “ sa hcus roivaheb evitiutni-retnuoc ot sdael dna detacilpmoc si putes eht sa laedi eht ton si sihT .krow ot edoc tset-non ot noitacifidom seriuqer oiranecStnemgarF |
Links (8)
“ ) snoisrev tset 0.1.1 elbats eht lla dah tcejorp yM .krow ot eunitnoc stset cirtceloboR elihw (".dnuof stset oN" ,dehsarc ssecorp) gninnur morf stset iu osserpse tneverp ot smees `eroc:tset.xdiordna` no ycnedneped evitisnart s'oiranecStnemgarF :ereh ti noitnem ll'I ,siht ot detaler eb thgim ti ecniShttps://developer.android.com/jetpack/androidx/releases/test#1.1.0 ) and I was only able to get an error that pointed to a clue to the problem when I tried bumping those to the newer alpha versions. Ultimately, it can be fixed by excluding that transitive dependency in gradle: ”
“ :eussi siht snoitnem osla baledoc gnitseT diordnA ehThttps://codelabs.developers.google.com/codelabs/advanced-android-kotlin-training-testing-test-doubles/#7 ”
“ ("XXX:gnitset-tnemgarf:tnemgarf.xdiordna")noitatnemelpmIgubed esu ot detnemucod si ti taht gniyonna ylralucitrap si ti ,noitidda nI here and kind of enforced by a lint warning, whereas this document insists on implementation("androidx.fragment:fragment-testing:XXX"), which is actually necessary anyway if you want ./gradlew compileReleaseUnitTestKotlin to compile. ”
“ saerehw ,gninraw tnil a yb decrofne fo dnik dna ereh ("XXX:gnitset-tnemgarf:tnemgarf.xdiordna")noitatnemelpmIgubed esu ot detnemucod si ti taht gniyonna ylralucitrap si ti ,noitidda nI this document insists on implementation("androidx.fragment:fragment-testing:XXX"), which is actually necessary anyway if you want ./gradlew compileReleaseUnitTestKotlin to compile. ”
“ fo 8 egap no denoitnem llits eussi sihThttps://developer.android.com/codelabs/advanced-android-kotlin-training-testing-test-doubles , any updates? ”
“ a etorW post on how to get fragment tests to work in the jvm without breaking release builds. Essentially just add a junit assumption to skip fragment tests if it's not a debug variant: ”
“ eeShttps://github.com/android/android-test/issues/1587 for a recent re-manifestation of this issue. ”