其他分享
首页 > 其他分享> > 如何为测试添加权限到AndroidManifest.xml

如何为测试添加权限到AndroidManifest.xml

作者:互联网

docs状态:

As mentioned previously, next to the main sourceSet is the androidTest sourceSet, located by default in src/androidTest/
….
The sourceSet should not contain an AndroidManifest.xml as it is automatically generated.

因此,如果我想为测试添加额外的权限,正确的方法是什么?

解决方法:

从Android Gradle插件的0.13.0版本(2014/09/18发布)开始,现在可以为Android测试创建自定义清单.

It is now possible to provide a manifest for test apps (src/androidTest/AndroidManifest.xml)

来源:https://sites.google.com/a/android.com/tools/tech-docs/new-build-system

有关更多信息,请参见样本“gradle_examples_0.14.4/tree/master/androidManifestInTest”-尽管在我看来,不需要任何特殊配置.

标签:android-manifest,android-testing,android
来源: https://codeday.me/bug/20191029/1958094.html