2012-01-26 51 views
0

我遵循寫下here的步驟。當我嘗試使用adb命令重新啓動應用程序時出現問題。 LogCat顯示錯誤:Android原生驅動程序,啓動帶儀器的應用程序

01-26 20:40:30.455: E/AndroidRuntime(418): java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo{com.google.android.testing.nativedriver.simplelayouts/com.google.android.testing.nativedriver.server.ServerInstrumentation}: java.lang.ClassNotFoundException: com.google.android.testing.nativedriver.server.ServerInstrumentation in loader dalvik.system.PathClassLoader[/data/app/com.google.android.testing.nativedriver.simplelayouts-1.apk:/data/app/com.google.android.testing.nativedriver.simplelayouts-1.apk] 
01-26 20:40:30.455: E/AndroidRuntime(418): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4202) 
01-26 20:40:30.455: E/AndroidRuntime(418): at android.app.ActivityThread.access$3000(ActivityThread.java:125) 
01-26 20:40:30.455: E/AndroidRuntime(418): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071) 
01-26 20:40:30.455: E/AndroidRuntime(418): at android.os.Handler.dispatchMessage(Handler.java:99) 
01-26 20:40:30.455: E/AndroidRuntime(418): at android.os.Looper.loop(Looper.java:123) 
01-26 20:40:30.455: E/AndroidRuntime(418): at android.app.ActivityThread.main(ActivityThread.java:4627) 
01-26 20:40:30.455: E/AndroidRuntime(418): at java.lang.reflect.Method.invokeNative(Native Method) 
01-26 20:40:30.455: E/AndroidRuntime(418): at java.lang.reflect.Method.invoke(Method.java:521) 
01-26 20:40:30.455: E/AndroidRuntime(418): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 
01-26 20:40:30.455: E/AndroidRuntime(418): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 
01-26 20:40:30.455: E/AndroidRuntime(418): at dalvik.system.NativeStart.main(Native Method) 
01-26 20:40:30.455: E/AndroidRuntime(418): Caused by: java.lang.ClassNotFoundException: com.google.android.testing.nativedriver.server.ServerInstrumentation in loader dalvik.system.PathClassLoader[/data/app/com.google.android.testing.nativedriver.simplelayouts-1.apk:/data/app/com.google.android.testing.nativedriver.simplelayouts-1.apk] 
01-26 20:40:30.455: E/AndroidRuntime(418): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) 
01-26 20:40:30.455: E/AndroidRuntime(418): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) 
01-26 20:40:30.455: E/AndroidRuntime(418): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) 
01-26 20:40:30.455: E/AndroidRuntime(418): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4199) 

我已經把所有內容放在庫路徑中。

+0

你能找到問題所在。即時通訊面臨這一點。請告訴我。 – Varun

回答

0

我之前遇到過這個問題,我的解決方案是確保我的jar文件在Eclipse中正確引用,然後重構 sample-layouts項目。這將罐子滾入到構建中,以便在運行時找到它們。

1

太棒了。 在eclipse中的構建路徑設置中,我將順序移動了server-standalone.jar文件,然後運行。