I am developing an android application in eclipse that needs to use JSON, Google places API and such. But i get an error at an “@Key” annonation, and i think that i can fix this by simply installing some Google APIs Client Library for Java. But how can i install this in eclipse??? Please respond, i really need help! Thanks SO much in advance!
This is one of the java class files that has the @Key annonation error:
package com.ecs.googleplaces.sample;
import java.util.List;
import com.google.api.client.util.Key;
public class PlacesList {
@Key
public String status;
@Key
public List<place> results;
}
You just need to download the client library jar from Google and add it to the build path in your Eclipse project.
What I tend to do is create a “libs” directory and then copy the jar into that folder.
Then in Eclipse, right click on the project, and select Build Path -> Add Libraries and follow the wizard to add your jar.