Unable to resolve activity for: Intent

后端 未结 7 1803
伪装坚强ぢ
伪装坚强ぢ 2021-01-17 08:21

I am having a problem in running Android unit test. I got this error when I tried to run a simple test.

Here\'s the log:

Blockquote java.la

7条回答
  •  醉梦人生
    2021-01-17 09:14

    I had a similar problem with a simple test project for an app that was just a splash screen. I found that I had implemented the constructor wrong. My initial implementation of the constructor was this...

    public SplashScreenTest(){
        super("com.mycomp.myapp.SplashScreen", SplashScreen.class);
    }
    

    After some beating my head against the wall, I somehow decided to remove the SplashScreen from the pkg argument of super(). My successful implementation is now like this...

    public SplashScreenTest() {
        super("com.mycomp.myapp", SplashScreen.class);
    }
    

    I hope that this helps you or others solve the problem.

提交回复
热议问题