Unable to resolve activity for: Intent

后端 未结 7 1865
伪装坚强ぢ
伪装坚强ぢ 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:17

    In my case the problem was that TestFragmentActivity, meaning the Activity used in our test

    extends ActivityInstrumentationTestCase2
    

    must be available in the package defined in Manifest.xml as targetPackage:

    
    

    My solution was to move TestFragmentActivity into tested application package.

提交回复
热议问题