Instrumentation运行:在构造函数错误中,类init的java.lang.Error失败

时间:2013-08-27 18:35:32

标签: eclipse

我写了一个仪器测试: 确切地说它显示了验证错误:

public WebViewActivityTest() {
           super(WebViewActivity.class);
Constructor used: 

W/dalvikvm(  858): Class init failed in Constructor.constructNative (Lcom/amazon/webviewapp/test/WebViewActivityTest;)

D/AndroidRuntime(  858): Shutting down VM

W/dalvikvm(  858): threadid=1: thread exiting with uncaught exception (group=0x40a70930)

E/AndroidRuntime(  858): FATAL EXCEPTION: main

E/AndroidRuntime(  858): java.lang.VerifyError: com/amazon/webviewapp/test/WebViewActivityTest

E/AndroidRuntime(  858):    at java.lang.reflect.Constructor.constructNative(Native Method)

E/AndroidRuntime(  858):    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)

E/AndroidRuntime(  858):    at junit.framework.TestSuite.createTest(TestSuite.java:61)

E/AndroidRuntime(  858):    at junit.framework.TestSuite.addTestMethod(TestSuite.java:294)

E/AndroidRuntime(  858):    at junit.framework.TestSuite.addTestsFromTestCase(TestSuite.java:150)

E/AndroidRuntime(  858):    at junit.framework.TestSuite.<init>(TestSuite.java:129)

E/AndroidRuntime(  858):    at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:118)

E/AndroidRuntime(  858):    at android.test.AndroidTestRunner.getTest(AndroidTestRunner.java:148)

E/AndroidRuntime(  858):    at android.test.AndroidTestRunner.setTestClassName(AndroidTestRunner.java:56)

E/AndroidRuntime(  858):    at android.test.suitebuilder.TestSuiteBuilder.addTestClassByName(TestSuiteBuilder.java:80)

E/AndroidRuntime(  858):    at android.test.InstrumentationTestRunner.parseTestClass(InstrumentationTestRunner.java:444)

E/AndroidRuntime(  858):    at android.test.InstrumentationTestRunner.parseTestClasses(InstrumentationTestRunner.java:425)

E/AndroidRuntime(  858):    at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:370)

E/AndroidRuntime(  858):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4382)

E/AndroidRuntime(  858):    at android.app.ActivityThread.access$1300(ActivityThread.java:141)

E/AndroidRuntime(  858):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)

E/AndroidRuntime(  858):    at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime(  858):    at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime(  858):    at android.app.ActivityThread.main(ActivityThread.java:5039)

E/AndroidRuntime(  858):    at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime(  858):    at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime(  858):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)

E/AndroidRuntime(  858):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)

E/AndroidRuntime(  858):    at dalvik.system.NativeStart.main(Native Method)

W/ActivityManager(  285): Error in app com.amazon.webviewapp running instrumentation ComponentInfo{com.amazon.webviewapp.test/android.test.InstrumentationTestRunner}:

W/ActivityManager(  285):   java.lang.VerifyError

W/ActivityManager(  285):   java.lang.VerifyError: com/amazon/webviewapp/test/WebViewActivityTest

D/AndroidRuntime(  848): Shutting down VM

0 个答案:

没有答案