Test run failed: Instrumentation run failed due to 'java.lang.ClassNotFoundException'

后端 未结 7 1020
攒了一身酷
攒了一身酷 2021-01-03 20:33

This is my first time setting up an Android test project to test a Android project.

I\'ve created a very basic test case which I\'m trying to get to run, however wh

7条回答
  •  长情又很酷
    2021-01-03 20:50

    I had upgraded to androidx libraries and started getting this error.

    To fix it, in build.gradle I changed the line:

    testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
    

    to

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    

提交回复
热议问题