使用get()方法在Android上出现Restlet错误

时间:2014-10-27 17:45:45

标签: java android apache restlet

 ClientResource resource = new ClientResource(webApi);
    Representation r = resource.get(); // ERROR HERE
    String json = "";
    try{
        json = r.getText();
    }catch(IOException e){
        Logger.getLogger(UtilityClass.class.getName()).log(Level.SEVERE, null, e);
    }

我尝试将我的Android应用程序与Apache Server连接,并且我使用restlet框架进行简单快速的连接。现在我的问题是,当我尝试读取时出现错误,使用方法get(),我创建的资源给了我以下错误:

10-27 18:22:39.357  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ Starting the internal HTTP client
10-27 18:22:39.387  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ Error while handling an HTTP client call
10-27 18:22:39.387  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ [ 10-27 18:22:39.397 27068:27068 W/System.err ]
    10-27 18:22:39.357  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ Starting the internal HTTP client
10-27 18:22:39.387  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ Error while handling an HTTP client call
10-27 18:22:39.387  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ [ 10-27 18:22:39.397 27068:27068 W/System.err ]
    android.os.NetworkOnMainThreadException
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.net.InetAddress.getLocalHost(InetAddress.java:365)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientCall.getLocalAddress(ClientCall.java:67)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientCall.<init>(ClientCall.java:90)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.connector.HttpUrlConnectionCall.<init>(HttpUrlConnectionCall.java:92)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.connector.HttpClientHelper.create(HttpClientHelper.java:155)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientAdapter.toSpecific(ClientAdapter.java:159)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:111)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.Client.handle(Client.java:162)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.routing.Filter.doHandle(Filter.java:159)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.routing.Filter.handle(Filter.java:206)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1104)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handleOutbound(ClientResource.java:1188)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1059)
10-27 18:22:39.397  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1035)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:937)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.get(ClientResource.java:645)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.fromtheroad.application.controllerclasses.UtilityClass.getAllArtists(UtilityClass.java:224)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.example.gianmarco.fromtheroad.ArtistList.onCreate(ArtistList.java:37)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.Activity.performCreate(Activity.java:5241)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.access$800(ActivityThread.java:145)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:102)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.Looper.loop(Looper.java:136)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5081)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
10-27 18:22:39.407  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ A recoverable error was detected (1002), attempting again in 2000 ms.
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ Error while handling an HTTP client call
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ [ 10-27 18:22:41.419 27068:27068 W/System.err ]
    android.os.NetworkOnMainThreadException
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.net.InetAddress.getLocalHost(InetAddress.java:365)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientCall.getLocalAddress(ClientCall.java:67)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientCall.<init>(ClientCall.java:90)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.connector.HttpUrlConnectionCall.<init>(HttpUrlConnectionCall.java:92)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.connector.HttpClientHelper.create(HttpClientHelper.java:155)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientAdapter.toSpecific(ClientAdapter.java:159)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:111)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.Client.handle(Client.java:162)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.routing.Filter.doHandle(Filter.java:159)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.routing.Filter.handle(Filter.java:206)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1104)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.retry(ClientResource.java:1664)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1112)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handleOutbound(ClientResource.java:1188)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1059)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1035)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:937)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.get(ClientResource.java:645)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.fromtheroad.application.controllerclasses.UtilityClass.getAllArtists(UtilityClass.java:224)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.example.gianmarco.fromtheroad.ArtistList.onCreate(ArtistList.java:37)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.Activity.performCreate(Activity.java:5241)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.access$800(ActivityThread.java:145)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:102)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.Looper.loop(Looper.java:136)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5081)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
10-27 18:22:41.419  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ A recoverable error was detected (1002), attempting again in 2000 ms.
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ Error while handling an HTTP client call
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ [ 10-27 18:22:43.471 27068:27068 W/System.err ]
    android.os.NetworkOnMainThreadException
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.net.InetAddress.getLocalHost(InetAddress.java:365)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientCall.getLocalAddress(ClientCall.java:67)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientCall.<init>(ClientCall.java:90)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.connector.HttpUrlConnectionCall.<init>(HttpUrlConnectionCall.java:92)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.connector.HttpClientHelper.create(HttpClientHelper.java:155)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientAdapter.toSpecific(ClientAdapter.java:159)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:111)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.Client.handle(Client.java:162)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.routing.Filter.doHandle(Filter.java:159)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.routing.Filter.handle(Filter.java:206)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1104)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.retry(ClientResource.java:1664)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1112)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.retry(ClientResource.java:1664)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1112)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handleOutbound(ClientResource.java:1188)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1059)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1035)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:937)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.get(ClientResource.java:645)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.fromtheroad.application.controllerclasses.UtilityClass.getAllArtists(UtilityClass.java:224)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.example.gianmarco.fromtheroad.ArtistList.onCreate(ArtistList.java:37)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.Activity.performCreate(Activity.java:5241)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.access$800(ActivityThread.java:145)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:102)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.Looper.loop(Looper.java:136)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5081)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ Internal Connector Error (1002) - The connector encountered an unexpected condition which prevented it from fulfilling the request
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.doError(ClientResource.java:599)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handleInbound(ClientResource.java:1165)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1060)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1035)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:937)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.get(ClientResource.java:645)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.fromtheroad.application.controllerclasses.UtilityClass.getAllArtists(UtilityClass.java:224)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.example.gianmarco.fromtheroad.ArtistList.onCreate(ArtistList.java:37)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.Activity.performCreate(Activity.java:5241)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.access$800(ActivityThread.java:145)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:102)
10-27 18:22:43.471  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.Looper.loop(Looper.java:136)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5081)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ Caused by: android.os.NetworkOnMainThreadException
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at java.net.InetAddress.getLocalHost(InetAddress.java:365)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientCall.getLocalAddress(ClientCall.java:67)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientCall.<init>(ClientCall.java:90)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.connector.HttpUrlConnectionCall.<init>(HttpUrlConnectionCall.java:92)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.connector.HttpClientHelper.create(HttpClientHelper.java:155)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.ClientAdapter.toSpecific(ClientAdapter.java:159)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:111)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.Client.handle(Client.java:162)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.routing.Filter.doHandle(Filter.java:159)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.routing.Filter.handle(Filter.java:206)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1104)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.retry(ClientResource.java:1664)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1112)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.retry(ClientResource.java:1664)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1112)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handleOutbound(ClientResource.java:1188)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ at org.restlet.resource.ClientResource.handle(ClientResource.java:1059)
10-27 18:22:43.481  27068-27068/com.example.gianmarco.fromtheroad W/System.err﹕ ... 19 more

0 个答案:

没有答案