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

如何为测试添加权限到AndroidManifest.xml,第1张

概述docs状态:Asmentionedpreviously,nexttothemainsourceSetistheandroidTestsourceSet,locatedbydefaultinsrc/androidTest/….ThesourceSetshouldnotcontainanAndroidManifest.xmlasitisautomaticallygenerated.因此,如果我想为测试添加额外的

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”-尽管在我看来,不需要任何特殊配置.

总结

以上是内存溢出为你收集整理的如何为测试添加权限到AndroidManifest.xml全部内容,希望文章能够帮你解决如何为测试添加权限到AndroidManifest.xml所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1088336.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-27
下一篇2022-05-27

发表评论

登录后才能评论

评论列表(0条)

    保存