Search code examples
androidgoogle-app-enginebuildpath

An error occured when attemping to generate client libraries


I've kept the updates ON in Eclipse, so may be Google app engine is causing the problem,Still didn't got the solution.

The Error log is here

java.lang.reflect.InvocationTargetException
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:82)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 17090
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:180)
at com.google.gson.Gson.fromJson(Gson.java:755)
at com.google.gson.Gson.fromJson(Gson.java:721)
at com.google.gson.Gson.fromJson(Gson.java:670)
at com.google.gson.Gson.fromJson(Gson.java:642)
at com.google.gdt.eclipse.managedapis.ManagedApiUtils.findAndReadDependencyFile(ManagedApiUtils.java:185)
at com.google.gdt.eclipse.managedapis.ManagedApiUtils.findAndReadDependencyFile(ManagedApiUtils.java:179)
at com.google.gdt.eclipse.managedapis.ManagedApiUtils.findAndReadDependencyFile(ManagedApiUtils.java:179)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.copyToConnectedAndroidProject(SwarmServiceCreator.java:148)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:453)
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:80)
... 1 more
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column     17090
at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:322)

The Problem is:- I've created a project with the app engine and was running perfectly but to due to some error in build path i've deleted the project and the app engine from the workspace and imported it again.

Now whenever i generate client libraries from app engine then this error is coming.

I've tried cleaning project,closing and reopening eclipse then also its not working please help me.

Edit

I've copied the same code in new project and its working fine but not in old project


Solution

  • Please Turn off Google AppEngine Updates before proceeding the steps.

    Steps to turn off Updates of eclipse is:-

    1) Window->preferences->Install/Update->Automatic Updates(Uncheck it)

    Steps followed while creating the new project which resolved me the error is:-

    1) Create New Android project.

    2) Right Click on project then Google->Generate App Engine Backend which creates a new project named Project-AppEngine

    3) Copied all the Entities and the endpoints in AppEngine project.

    4) Now I tried to generate the Cloud Endpoint Library and it worked.

    This answer is just to escape the problem if you are facing it.