错误:无法运行程序“$ {adb}”:CreateProcess error = 2,系统找不到指定的文件

时间:2014-02-08 19:38:55

标签: android ant robotium build.xml

这是我的构建文件即时收到错误无法运行程序“$ {adb}”:CreateProcess error = 2,系统找不到指定的文件

            <!-- Ant targets for Robotium testing -->
            <target name="robotium">
                <echo>Running all tests...</echo>
                <antcall target="robotium-test"/>
            </target>

            <!-- Ant targets for each Robotium test package.
            Each test-class line is done in sequence.-->
            <target name="robotium-test">
                <test-class class="com.robotium.test.testbodystretch" package="com.robotium.test"/>
            </target>



            <!-- Macro definitions for Robotium testing -->
        <macrodef name="test-class">
            <attribute name="package"/>
            <attribute name="class"/>

            <sequential>
                    <echo level="info">Running tests for @{class}</echo>
                    **<exec executable="${adb}" failonerror="false">
                    <arg line="${adb.device.arg}"/>
                    <arg value="shell"/>
                    <arg value="am"/>
                    <arg value="instrument"/>
                    <arg value="-w"/>
                    <arg value="-e"/>
                    <arg value="class"/>
                    <arg value="@{class}"/>
                    <arg value="com.robotium.test/${test.runner}"/>
                    </exec>**
                </sequential>

        </macrodef>

请帮我找一个解决方案。提前致谢

0 个答案:

没有答案