當我運行我的android UIAutomator代碼時,它顯示以下錯誤。當我運行我的android UIAutomator代碼時,它顯示錯誤
INSTRUMENTATION_RESULT:shortMsg =了java.lang.RuntimeException
INSTRUMENTATION_RESULT:longMsg = com.android.ui.testing
INSTRUMENTATION_CODE:0
我只是跑在developer.android給出的示例代碼.com
如何解決這個錯誤?
登錄下面附:
01-05 01:07:53.559: D/AndroidRuntime(5712): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
01-05 01:07:53.559: D/AndroidRuntime(5712): CheckJNI is ON
01-05 01:07:53.559: E/AndroidRuntime(5712): cannot open customer xml file
01-05 01:07:53.559: E/AndroidRuntime(5712): /system/csc/customer.xml can't open file
01-05 01:07:53.564: D/AndroidRuntime(5712): readGMSProperty: start
01-05 01:07:53.564: D/AndroidRuntime(5712): readGMSProperty: already setted!!
01-05 01:07:53.564: D/AndroidRuntime(5712): readGMSProperty: end
01-05 01:07:53.589: D/dalvikvm(5712): Trying to load lib libjavacore.so 0x0
01-05 01:07:53.599: D/dalvikvm(5712): Added shared lib libjavacore.so 0x0
01-05 01:07:53.609: D/dalvikvm(5712): Trying to load lib libnativehelper.so 0x0
01-05 01:07:53.609: D/dalvikvm(5712): Added shared lib libnativehelper.so 0x0
01-05 01:07:53.664: I/dalvikvm(5712): Zip is good, but no classes.dex inside, and no valid .odex file in the same directory
01-05 01:07:53.874: D/dalvikvm(5712): Note: class Landroid/app/ActivityManagerNative; has 152 unimplemented (abstract) methods
01-05 01:07:53.924: D/AndroidRuntime(5712): Calling main entry com.android.commands.uiautomator.Launcher
01-05 01:07:53.934: D/AndroidRuntime(5712): Shutting down VM
01-05 01:07:53.934: W/dalvikvm(5712): threadid=1: thread exiting with uncaught exception (group=0x40ffa2a0)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): uncaught exception
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): java.lang.RuntimeException: com.uia.example.my.LaunchSettings
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:95)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:82)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:76)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:237)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at dalvik.system.NativeStart.main(Native Method)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): Caused by: java.lang.ClassNotFoundException: com.uia.example.my.LaunchSettings
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.uiautomator.testrunner.TestCaseCollector.addTestClass(TestCaseCollector.java:83)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.uiautomator.testrunner.TestCaseCollector.addTestClass(TestCaseCollector.java:71)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.uiautomator.testrunner.TestCaseCollector.addTestClasses(TestCaseCollector.java:52)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:92)
01-05 01:07:53.939: E/UiAutomatorTestRunner(5712): ... 6 more
01-05 01:07:53.944: I/AndroidRuntime(5712): VM exiting with result code -1.
你如何運行呢?仿真器?版? –
你需要看logcat的輸出瞭解wher的了java.lang.RuntimeException是。請提供日誌貓輸出。 – Snicolas
你有沒有想過這個?我有同樣的問題,並試圖在這個頁面上的所有答案沒有運氣。我正在嘗試使用Eclipse導出來創建jar文件。 – onetwopunch