Instrumentation run failed due to 'Process crashed.'

前端 未结 6 1376
感动是毒
感动是毒 2021-02-02 06:12

I wanted to run the following test:

package com.xxx.yyy;

import android.content.Context;
import androidx.test.InstrumentationRegistry;
import androidx.test.runn         


        
6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-02 06:33

    This error appeared because I changed testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" to testInstrumentationRunner "androidx.test.ext.junit.runners.AndroidJUnit4" in build.gradle. In LogCat I saw:

    java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo{com.example.debug.test/androidx.test.ext.junit.runners.AndroidJUnit4}: java.lang.ClassNotFoundException: Didn't find class "androidx.test.ext.junit.runners.AndroidJUnit4" on path: DexPathList[[zip file ...
    

提交回复
热议问题