1

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

TechArcSri
  • 1,982
  • 1
  • 13
  • 20
  • It sounds like something was misconfigured or broken in your old project. Given that you created a new project and manually put in all your code and files, and the client library is now generating correctly, please post a self-answer to this question with just some basic info (which would be simpler), or figure out what was wrong and post that (probably not going to happen). – Nick Dec 11 '14 at 18:21
  • @anonymous4444 Still the solution is unknown and the issue is not resolved – TechArcSri Jan 06 '15 at 11:04
  • You said that you copied the files into a new eclipse project and now it works fine. It sounds like A) your problem is solved B) you know the steps you used to solve the problem. Now, if you want to do a little bit of investigation to figure out *why* making a new eclipse project worked (hint from my first comment: it was broken somehow), you can also include this in your self-answer... but whether the issue is resolved or not is undoubted, since you said yourself "it's working fine". – Nick Jan 06 '15 at 16:44

3 Answers3

0

Did you clean the project ? First for all these issues have to clean project.

If it remains the error then check with Android Library you are working with. Be assured of using latest Android Library that is 4.3 to 4.4.2.

If still remains the issue there might be problem with Google Api package reference. Then add Google API reference 4.3 by going to properties of the project

Avinash Ch
  • 76
  • 5
0

Expected BEGIN_OBJECT but was STRING at line 1 column 17090.

this line shows that there is an issue in your json input string that you are giving as a input to the gson. if you resolve this, your problem might be solved.

Amrut Bidri
  • 6,276
  • 6
  • 38
  • 80
  • Actually I've not change any code and previously it was working fine but now what happened? I don't feel this is error because the libs file is not getting added – TechArcSri Sep 16 '14 at 08:53
0

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.

TechArcSri
  • 1,982
  • 1
  • 13
  • 20