我为连接到互联网的android编写了一个程序。
我收到以下错误:
The application has stopped unexpectedly.Please try again..
有什么问题?
Eclipse中的log cat如下:
09-02 12:43:42.421: W/dalvikvm(12362): threadid=1: thread exiting with uncaught exception (group=0x40018578)
09-02 12:43:42.437: E/AndroidRuntime(12362): FATAL EXCEPTION: main
09-02 12:43:42.437: E/AndroidRuntime(12362): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.networkusage/com.example.networkusage.NetworkActivity}: java.lang.ClassNotFoundException: com.example.networkusage.NetworkActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.android.networkusage-1.apk]
09-02 12:43:42.437: E/AndroidRuntime(12362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
09-02 12:43:42.437: E/AndroidRuntime(12362): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
09-02 12:43:42.437: E/AndroidRuntime(12362): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
09-02 12:43:42.437: E/AndroidRuntime(12362): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
09-02 12:43:42.437: E/AndroidRuntime(12362): at android.os.Handler.dispatchMessage(Handler.java:99)
09-02 12:43:42.437: E/AndroidRuntime(12362): at android.os.Looper.loop(Looper.java:130)
09-02 12:43:42.437: E/AndroidRuntime(12362): at android.app.ActivityThread.main(ActivityThread.java:3687)
09-02 12:43:42.437: E/AndroidRuntime(12362): at java.lang.reflect.Method.invokeNative(Native Method)
09-02 12:43:42.437: E/AndroidRuntime(12362): at java.lang.reflect.Method.invoke(Method.java:507)
09-02 12:43:42.437: E/AndroidRuntime(12362): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
09-02 12:43:42.437: E/AndroidRuntime(12362): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
09-02 12:43:42.437: E/AndroidRuntime(12362): at dalvik.system.NativeStart.main(Native Method)
09-02 12:43:42.437: E/AndroidRuntime(12362): Caused by: java.lang.ClassNotFoundException: com.example.networkusage.NetworkActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.android.networkusage-1.apk]
09-02 12:43:42.437: E/AndroidRuntime(12362): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
09-02 12:43:42.437: E/AndroidRuntime(12362): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
09-02 12:43:42.437: E/AndroidRuntime(12362): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
09-02 12:43:42.437: E/AndroidRuntime(12362): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
09-02 12:43:42.437: E/AndroidRuntime(12362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
09-02 12:43:42.437: E/AndroidRuntime(12362): ... 11 more