AndroidManifest in androidTest directory being ignored

前端 未结 6 2067
一整个雨季
一整个雨季 2020-12-05 06:52

I\'m trying to test using the following directory structure (which was setup by Android Studio):

\"test

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-05 07:17

    I needed to do something similar. I created a folder named "debug" next to androidTest, which corresponds to the debug variant of the app, and put an AndroidManifest.xml with the permission in that folder. Then the permission works under test since the test app uses the debug variant. It's not ideal because it blurs the line between test and debug, which aren't quite the same thing.

    I think what's happening is that the permissions in androidTest/AndroidManifest.xml are going to the test app, not the target app, although it's not 100% clear to me if there are actually two different APKs or what.

提交回复
热议问题