WEB开发网
开发学院手机开发Android 开发 Android-Junit-TestCase-ClassLoader 讨论下Andro... 阅读

Android-Junit-TestCase-ClassLoader 讨论下Android的单元测试

 2010-08-21 06:18:00 来源:WEB开发网   
核心提示:android:name="android.test.runner">< /application>< uses-sdk android:minSdkVersion="7" />< instrumentation android:targetPack

android:name="android.test.runner">

< /application>

< uses-sdk android:minSdkVersion="7" />

< instrumentation android:targetPackage="com.demo.contact"

android:name="android.test.InstrumentationTestRunner" />

< /manifest>

异常栈:

Java代码

java.lang.NoClassDefFoundError: android/database/Cursor

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

at java.lang.Class.getMethod0(Unknown Source)

at java.lang.Class.getMethod(Unknown Source)

Caused by: java.lang.ClassNotFoundException: android.database.Cursor

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

... 10 more

java.lang.NoClassDefFoundError: android/database/Cursor

at java.lang.Class.getDeclaredMethods0(Native Method)

at java.lang.Class.privateGetDeclaredMethods(Unknown Source)

at java.lang.Class.getMethod0(Unknown Source)

at java.lang.Class.getMethod(Unknown Source)

Caused by: java.lang.ClassNotFoundException: android.database.Cursor

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

上一页  1 2 3 4  下一页

Tags:Android Junit TestCase

编辑录入:coldstar [复制链接] [打 印]
赞助商链接