简体   繁体   English

运行ProjectTests时出错:AndroidManifest.xml中未指定目标包

[英]Error running ProjectTests: Target package is not specified in AndroidManifest.xml

I just installed AndroidStudio 1.8 which provides functionality for running unittests. 我刚刚安装了AndroidStudio 1.8,它提供了用于运行单元测试的功能。 It runs my unittests, but when I try to debug a test, I get the following error: 它运行我的单元测试,但是当我尝试调试测试时,出现以下错误:

error running tests: targetpackage is not specified in manifest 运行测试时出错:清单中未指定targetpackage

I have created a new project with AndroidStudio. 我已经使用AndroidStudio创建了一个新项目。 This will put the packages in the src/main/java directory. 这会将软件包放在src / main / java目录中。

As explained in: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Testing I have to put my unittests in the same packages in src/intstrumentTest/java 如以下内容所述: http : //tools.android.com/tech-docs/new-build-system/user-guide#TOC-Testing我必须将单元测试放在src / intstrumentTest / java中的相同程序包中

I use a default AndroidTest configuration. 我使用默认的AndroidTest配置。

When I look at the generated AndroidManifest.xml for my tests I see the correct targetPackage in the intrumentation tag. 当我查看为测试生成的AndroidManifest.xml时,我会在intrumentation标签中看到正确的targetPackage。

Any help would be appreciated. 任何帮助,将不胜感激。

As explained in the release notes , AS 0.1.8 only supports running tests, not debugging them. 发行说明中所述,AS 0.1.8仅支持运行测试,而不调试它们。 Debugging tests is expected to be there in 0.1.9. 调试测试预计在0.1.9中进行。

EDIT: 0.1.9 with debugging support has been released now. 编辑:具有调试支持的0.1.9现在已经发布。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM