1
votes

I Am new to Google app engine connected android project. when i tried creating and running the project i got below exception

07-19 07:22:18.437: W/System.err(1854): com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
07-19 07:22:18.437: W/System.err(1854): Not Found
07-19 07:22:18.447: W/System.err(1854):     at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:111)
07-19 07:22:18.447: W/System.err(1854):     at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:38)
07-19 07:22:18.447: W/System.err(1854):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:312)
07-19 07:22:18.447: W/System.err(1854):     at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1042)
07-19 07:22:18.447: W/System.err(1854):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410)
07-19 07:22:18.457: W/System.err(1854):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343)
07-19 07:22:18.457: W/System.err(1854):     at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460)
07-19 07:22:18.457: W/System.err(1854):     at com.example.endpointdemoproject.MainActivity$EndpointsTask.doInBackground(MainActivity.java:55)
07-19 07:22:18.457: W/System.err(1854):     at com.example.endpointdemoproject.MainActivity$EndpointsTask.doInBackground(MainActivity.java:1)
07-19 07:22:18.457: W/System.err(1854):     at android.os.AsyncTask$2.call(AsyncTask.java:287)
07-19 07:22:18.467: W/System.err(1854):     at java.util.concurrent.FutureTask.run(FutureTask.java:234)
07-19 07:22:18.467: W/System.err(1854):     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
07-19 07:22:18.467: W/System.err(1854):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
07-19 07:22:18.467: W/System.err(1854):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
07-19 07:22:18.477: W/System.err(1854):     at java.lang.Thread.run(Thread.java:856)

What is this error and why I'm getting this. Please help me to find solution.

2
hey @ssl, did you get an answer to this? I am getting the same problem. Almost identical infact. - RaymondMachira
Even i have the same issue :( - anshul

2 Answers

1
votes

The HTTP response the Android application is receiving is a 404. This normally means that the server received the request but could not find resource requested or that it doesn't exist.

As your stack trace indicates you are attempting to reach an endpoint, a few possible causes of this 404 response are:

  • The URL used by the Android application is incorrect
  • The endpoint is not yet deployed
  • The endpoint is not visible
  • The endpoint and class are not properly annotated

After double-checking the URL, you should be able to see which endpoints are deployed and exposed by checking the API Explorer at https://developers.google.com/apis-explorer/?base=https://[YOUR-PROJECT-ID].appspot.com/_ah/api#p/, as mentioned by @easycheese. If you do not see the endpoint here that you are trying to reach, confirm that it is in fact deployed by redeploying your application.

If you've confirmed it's deployed but still do not see it in the API Explorer, review the endpoint method code to ensure the proper annotations are in place. The class must have an @Api annotation for its public non-static, non-bridged methods to be exposed. In addition, the @ApiResourceProperty(ignored = AnnotationBoolean.TRUE) may be used to prevent an endpoint from being accessible. Ensure that annotation is not present if you which to expose the method.

Once you've confirmed an accessible endpoint via the API Explorer, you should then be in a better position to test connectivity from your Android application.

0
votes

Check the answers on this question here

More than likely you never deployed your project correctly. Try redeploying it or check https://developers.google.com/apis-explorer/?base=https://[YOUR_PROJECT_ID].appspot.com/_ah/api#p/