[英]Not able to generate correct build.xml for android test project
I have created a main android project using "android" utility. 我已经使用“ android”实用程序创建了一个主要的android项目。 eg
例如
android create project --target 1 --name MyApp --path C:\\testandroid\\myui --activity LaunchActivity --package com.myui.activity android create project --target 1 --name MyApp --path C:\\ testandroid \\ myui --activity LaunchActivity --package com.myui.activity
build.xml got generated fine (has ant targets like debug, release etc) build.xml生成的很好(具有诸如调试,发布等的ant目标)
I generated a test android project (which depends on main project). 我生成了一个测试android项目(取决于主项目)。 I used "android" utility to do that.
我用“ android”工具来做到这一点。 eg
例如
android create test-project --path C:\\testandroid\\myuitest --main ..\\myui --name MfAppTest android create test-project --path C:\\ testandroid \\ myuitest --main .. \\ myui --name MfAppTest
build.xml got generated but incorrect (does not have targets like run-tests). build.xml已生成,但不正确(没有运行测试之类的目标)。 It has same targets as main project.
其目标与主要项目相同。
Can someone help as where is the problem? 有人可以帮忙解决问题所在吗? Thx.
谢谢。 Ashley
阿什利
This question is a bit old already, but anyway here I go: you will see the same targets by running 这个问题已经有点老了,但是无论如何我都会去:通过运行,您将看到相同的目标
ant -p 蚂蚁-p
on both the app and the test project. 在应用程序和测试项目上。 Don't worry about that.
不用担心
Try to do the following from the test project's root: 尝试从测试项目的根目录执行以下操作:
ant clean instrument install test 蚂蚁清洁仪安装测试
considering you have one and only one device connected (physical or emulator). 考虑到您仅连接了一台设备(物理设备或仿真器)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.