android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork

Posted by Breeze24
2016. 6. 4. 23:31 Android/TroubleShooting
android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork



아래와 같은 오류 발생 시에 Action 시작점에 아래 부분을 추가한다.


StrictMode.enableDefaults(); //추가되는 부분
super.onCreate(savedInstanceState);



 

10-06 17:25:13.767: D/DATA(22564): android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1100)

10-06 17:25:13.767: D/DATA(22564): java.net.InetAddress.lookupHostByName(InetAddress.java:428)

10-06 17:25:13.767: D/DATA(22564): java.net.InetAddress.getAllByNameImpl(InetAddress.java:279)

10-06 17:25:13.767: D/DATA(22564): java.net.InetAddress.getAllByName(InetAddress.java:252)

10-06 17:25:13.767: D/DATA(22564): java.net.Socket.tryAllAddresses(Socket.java:108)

10-06 17:25:13.767: D/DATA(22564): java.net.Socket.<init>(Socket.java:177)

10-06 17:25:13.767: D/DATA(22564): org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)

10-06 17:25:13.767: D/DATA(22564): org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)

10-06 17:25:13.767: D/DATA(22564): org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)

10-06 17:25:13.767: D/DATA(22564): org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)

10-06 17:25:13.767: D/DATA(22564): org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)

10-06 17:25:13.767: D/DATA(22564): org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)

10-06 17:25:13.767: D/DATA(22564): org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)

10-06 17:25:13.767: D/DATA(22564): com.sjlab.tourGuide.util.TourAPIUtil.getTourResponseXML(TourAPIUtil.java:54)

10-06 17:25:13.767: D/DATA(22564): com.sjlab.tourGuide.dataList.ListViewActivity.setSpinner1(ListViewActivity.java:100)

10-06 17:25:13.767: D/DATA(22564): com.sjlab.tourGuide.dataList.ListViewActivity.onCreate(ListViewActivity.java:76)

10-06 17:25:13.767: D/DATA(22564): android.app.Activity.performCreate(Activity.java:4728)

10-06 17:25:13.767: D/DATA(22564): android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1051)

10-06 17:25:13.767: D/DATA(22564): android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1924)

10-06 17:25:13.767: D/DATA(22564): android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1985)

10-06 17:25:13.767: D/DATA(22564): android.app.ActivityThread.access$600(ActivityThread.java:127)

10-06 17:25:13.777: D/DATA(22564): android.app.ActivityThread$H.handleMessage(ActivityThread.java:1151)

10-06 17:25:13.777: D/DATA(22564): android.os.Handler.dispatchMessage(Handler.java:99)

10-06 17:25:13.777: D/DATA(22564): android.os.Looper.loop(Looper.java:137)

10-06 17:25:13.777: D/DATA(22564): android.app.ActivityThread.main(ActivityThread.java:4482)

10-06 17:25:13.777: D/DATA(22564): java.lang.reflect.Method.invokeNative(Native Method)

10-06 17:25:13.777: D/DATA(22564): java.lang.reflect.Method.invoke(Method.java:511)

10-06 17:25:13.777: D/DATA(22564): com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)

10-06 17:25:13.777: D/DATA(22564): com.android.internal.os.ZygoteInit.main(ZygoteInit.java:561)

10-06 17:25:13.777: D/DATA(22564): dalvik.system.NativeStart.main(Native Method)

.