Android Studio import existing unit tests “Unable to find instrumentation info”

前端 未结 15 1822
故里飘歌
故里飘歌 2021-02-01 12:17

So I\'m trying our Android Studio and testing a project that worked in eclipse. I got everything compiling and the application will launch just fine, but I can\'t get my unit te

15条回答
  •  执笔经年
    2021-02-01 12:56

    If you have a testInstrumentationRunner defined in your build.gradle such as this:

    android {
        defaultConfig {
            testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner"
    

    make sure that in the run configuration window you use the exact same "Specific instrumentation runner" in your Android Studio / IntelliJ run configuration for your test.

提交回复
热议问题