launchFragmentInContainer unable to resolve Activity in Android

The error was related to the way I did import the dependencies on Gradle.

Before:

androidTestImplementation("androidx.fragment:fragment-testing:1.1.0-beta01")
implementation("androidx.fragment:fragment-ktx:1.1.0-beta01")
androidTestImplementation("androidx.test:core:1.2.0")
androidTestImplementation("androidx.test:rules:1.2.0")
androidTestImplementation("androidx.test:runner:1.2.0")

After:

debugImplementation("androidx.fragment:fragment-testing:1.1.0-beta01")
debugImplementation("androidx.fragment:fragment-ktx:1.1.0-beta01")
debugImplementation("androidx.test:core:1.2.0")
debugImplementation("androidx.test:rules:1.2.0")
debugImplementation("androidx.test:runner:1.2.0")

Changed from androidTestImplementation to debugImplementation and it solved the issue. Compiling and running, and green test as result.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)