I have coded and tested a Python Endpoints server-side for an Android app that I'm building.
The coded server-side works perfectly on the API Explorer. I'm also able to generate the zip containing the classes jar file, but when I import it, either on Eclipse or on Android Studio, I'm unable to use it's classes on my Android Project.
On Eclipse, under Android Private Libraries, I can see the model module, but none of it's classes. The main API classes are also missing.
On Android Studio, I can see all the classes when I expand the included jar file, but I'm unable to use any of them on my project as they do not resolve, even after a manual import. It seems that AS is properly importing the JAR as a lib, as while typing the import line on any of the project classes, auto-complete works, but it is missing all the classes.
Here is the command I'm using to generate the JAR file:
endpointscfg.py get_client_lib java --hostname localhost:8080 main.MyApi
My services class starts as following:
@endpoints.api(name='myapi', version='v1')
class MyApi(remote.Service):
I'm doing something wrong?
Also, from the java classes zip file, should I import into my Android project all the jar files contained by the libs directory?
Thanks in advance.
More information:
The generated jar contains a main class as follows:
public class MyApi extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {
}
and this main class has the following inner class:
public class Blob {
public Request request(java.lang.String type) throws java.io.IOException {
Request result = new Request(type);
initialize(result);
return result;
}
The inner class Blob has the bellow error on it's Request result object:
initialize (com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?>) in MyApi cannot be applied to (com.appspot.trim_bot.myapi.MyApi.Blob.Request)
Added on April 16th:
It seems that the compiled EndPoints classes cannot resolve their dependencies.