是否可以在改造中仅返回一个回声字符串,例如在我的php文件中我只打印
echo "hello world";
我只是改装的新手,我还不完全了解复古款。 顺便说一下,我很好奇为什么我会在log logcat上得到这个回应
> 12-16 23:23:21.047 22111-22141/com.example.fragment_listview
> D/OpenGLRenderer﹕ Render dirty regions requested: true 12-16
> 23:23:21.048 22111-22140/com.example.fragment_listview D/Retrofit﹕
> ---> HTTP GET http://192.168.0.121/news/hello 12-16 23:23:21.048 22111-22140/com.example.fragment_listview D/Retrofit﹕ ---> END HTTP
> (no body) 12-16 23:23:21.054
> 22111-22111/com.example.fragment_listview D/Atlas﹕ Validating map...
> 12-16 23:23:21.072 22111-22140/com.example.fragment_listview
> D/Retrofit﹕ ---- ERROR http://192.168.0.121/news/hello 12-16
> 23:23:21.073 22111-22140/com.example.fragment_listview D/Retrofit﹕
> java.lang.NoSuchMethodError: No static method
> hasRequestBody(Ljava/lang/String;)Z in class
> Lcom/squareup/okhttp/internal/http/HttpMethod; or its super classes
> (declaration of 'com.squareup.okhttp.internal.http.HttpMethod' appears
> in /data/app/com.example.fragment_listview-1/base.apk)
> at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.newHttpEngine(HttpURLConnectionImpl.java:321)
> at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.initHttpEngine(HttpURLConnectionImpl.java:303)
> at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:364)
> at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:466)
> at retrofit.client.UrlConnectionClient.readResponse(UrlConnectionClient.java:73)
> at retrofit.client.UrlConnectionClient.execute(UrlConnectionClient.java:38)
> at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:321)
> at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
> at retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278)
> at retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
> at retrofit.Platform$Android$2$1.run(Platform.java:142)
> at java.lang.Thread.run(Thread.java:818) 12-16 23:23:21.073 22111-22140/com.example.fragment_listview D/Retrofit﹕
> ---- END ERROR