我为我的项目进行了单元测试.它们在Eclipse中运行良好但在ant中失败并出现错误:
java.lang.RuntimeException: Stub!
Run Code Online (Sandbox Code Playgroud)
我automaticaly产生从的eclipseIDE acording到我的蚂蚁的build.xml 此文章.
我的build.xml文件:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="main" name="MyProjectJavaTest">
<property environment="env"/>
<property name="junit.output.dir" value="junit"/>
<property name="MyProject.location" value="../MyProject"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<path id="JUnit 4.libraryclasspath">
<pathelement location="../../../../../winapl/adt-bundle-windows-x86/eclipse/plugins/org.junit_4.8.2.v4_8_2_v20110321-1705/junit.jar"/>
<pathelement location="../../../../../winapl/adt-bundle-windows-x86/eclipse/plugins/org.hamcrest.core_1.1.0.v20090501071000.jar"/>
</path>
<path id="Android 4.2.libraryclasspath">
<pathelement location="../../../../../winapl/adt-bundle-windows-x86/sdk/platforms/android-4.2/android.jar"/>
</path>
<path id="Android Dependencies.libraryclasspath"/>
<path id="Persisted container [com.android.ide.eclipse.adt.DEPENDENCIES for project [MyProject]].libraryclasspath"/>
<path id="MyProject.classpath">
<pathelement location="${MyProject.location}/bin/classes"/>
<path refid="Android 4.2.libraryclasspath"/>
<path refid="Android Dependencies.libraryclasspath"/>
<path refid="Persisted container [com.android.ide.eclipse.adt.DEPENDENCIES for project [MyProject]].libraryclasspath"/>
</path>
<path id="MyProjectJavaTest.classpath">
<pathelement location="bin"/>
<path …Run Code Online (Sandbox Code Playgroud)