2 zzhjolin zzhjolin 于 2015.07.10 16:12 提问

出现unfortunately,Earthquake has stopped 2C

图片说明
下面是LogCat,请大牛们给看看
07-10 07:44:45.008: I/dalvikvm(981): threadid=3: reacting to signal 3
07-10 07:44:45.028: I/dalvikvm(981): Wrote stack traces to '/data/anr/traces.txt'
07-10 07:44:45.198: D/AndroidRuntime(981): Shutting down VM
07-10 07:44:45.198: W/dalvikvm(981): threadid=1: thread exiting with uncaught exception (group=0x409bf1f8)
07-10 07:44:45.218: E/AndroidRuntime(981): FATAL EXCEPTION: main
07-10 07:44:45.218: E/AndroidRuntime(981): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.paad.earthquake/com.paad.earthquake.Earthquake}: android.os.NetworkOnMainThreadException
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.ActivityThread.access$600(ActivityThread.java:123)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.os.Handler.dispatchMessage(Handler.java:99)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.os.Looper.loop(Looper.java:137)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-10 07:44:45.218: E/AndroidRuntime(981): at java.lang.reflect.Method.invokeNative(Native Method)
07-10 07:44:45.218: E/AndroidRuntime(981): at java.lang.reflect.Method.invoke(Method.java:511)
07-10 07:44:45.218: E/AndroidRuntime(981): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-10 07:44:45.218: E/AndroidRuntime(981): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-10 07:44:45.218: E/AndroidRuntime(981): at dalvik.system.NativeStart.main(Native Method)
07-10 07:44:45.218: E/AndroidRuntime(981): Caused by: android.os.NetworkOnMainThreadException
07-10 07:44:45.218: E/AndroidRuntime(981): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
07-10 07:44:45.218: E/AndroidRuntime(981): at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
07-10 07:44:45.218: E/AndroidRuntime(981): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
07-10 07:44:45.218: E/AndroidRuntime(981): at java.net.InetAddress.getAllByName(InetAddress.java:220)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpConnection.(HttpConnection.java:71)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpConnection.(HttpConnection.java:50)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpEngine.connect(HttpEngine.java:303)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
07-10 07:44:45.218: E/AndroidRuntime(981): at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:479)
07-10 07:44:45.218: E/AndroidRuntime(981): at com.paad.earthquake.EarthquakeListFragment.refreshEarthquakes(EarthquakeListFragment.java:58)
07-10 07:44:45.218: E/AndroidRuntime(981): at com.paad.earthquake.EarthquakeListFragment.onActivityCreated(EarthquakeListFragment.java:43)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:847)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1032)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1014)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1766)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.Activity.performCreate(Activity.java:4469)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-10 07:44:45.218: E/AndroidRuntime(981): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
07-10 07:44:45.218: E/AndroidRuntime(981): ... 11 more
07-10 07:44:45.508: I/dalvikvm(981): threadid=3: reacting to signal 3
07-10 07:44:45.538: I/dalvikvm(981): Wrote stack traces to '/data/anr/traces.txt'
07-10 07:44:45.748: I/dalvikvm(981): threadid=3: reacting to signal 3
07-10 07:44:45.758: I/dalvikvm(981): Wrote stack traces to '/data/anr/traces.txt'

3个回答

guwei4037
guwei4037   Ds   Rxr 2015.07.10 16:15

很明显,你的应用运行过程中产生异常了,看代码,设置断点跟踪调试一下。

Arnold9009
Arnold9009   2015.07.10 16:46

07-10 07:44:45.218: E/AndroidRuntime(981): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.paad.earthquake/com.paad.earthquake.Earthquake}: android.os.NetworkOnMainThreadException
从提示看,是因为你在UI线程里进行网络操作了,起一个线程,把网络操作放线程里吧(android 4.0之后不能在UI线程里进行网络操作了)

CSDNXIAON
CSDNXIAON   2015.07.16 15:21

unfortunately,launcher has stopped
在linux中出现there are stopped jobs
进入应用程序界面后出现"Unfortunately,Launcher has stopped"
----------------------同志你好,我是CSDN问答机器人小N,奉组织之命为你提供参考答案,编程尚未成功,同志仍需努力!

Csdn user default icon
上传中...
上传图片
插入图片