测试具体androidmanifest文件属性和课外活动 [英] Test specific androidmanifest file attributes and extra activities

查看:140
本文介绍了测试具体androidmanifest文件属性和课外活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我采用了android工作室与0.45的gradle构建打造我的项目。 (版本的Gradle 1.9)。在我的测试文件夹中创建我,我不想成为我释放code的一部分额外的活动。我在哪里指定要在Android清单这一活动。该设置的gradle只允许一个AndroidManifest文件,据我可以告诉。

I am using android studio 0.45 with gradle build to build my project. (gradle version 1.9). In my test folder I creating an extra activity that I don't want to be part of my release code. Where do I specify this activity in the Android Manifest. The gradle setup only allows for one AndroidManifest file as far as I can tell.

我也是用的测试项目额外的权限来模拟,我没有在我的版本code需要电话。我如何设置清单文件,以便在构建具体机制添加权限...

I am also using extra permissions in the test project to simulate phone calls that I don't need in my release code. How do I setup the manifest file so as to add permissions on a build specific mechanism...

推荐答案

这听起来像你应该设置你的测试类型,包括额外的活动,并在AndroidManifest文件的额外权限的产品风味。一个味道让你有源文件,只有到味道是具体的,和属性在得到在构建时与主清单合并在一起的清单。

It sounds like you should set up a product flavor for your test type, that includes the extra activity, and extra permissions in your AndroidManifest file. A flavor lets you have source files that are specific only to that flavor, and properties in the manifest that get merged together with the main manifest at build time.

在阅读的http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Product-flavors并给它一个镜头。

Read the docs at http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Product-flavors and give it a shot.

这篇关于测试具体androidmanifest文件属性和课外活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆