Using cloud endpoints jar in Android Studio.

190 views
Skip to first unread message

Kevin Day

unread,
Apr 10, 2014, 12:32:12 AM4/10/14
to google-a...@googlegroups.com
I've generate a few endpoints and generated my android client library, as described here:

https://developers.google.com/appengine/docs/java/endpoints/consume_android

Step 2 under "Adding the client library to the project" reads "Copy the client library generated from the backend API into /libs",  but it is unclear to me what to copy here. The entire contents of the zip? Just the .jar named something like localhost-appname-v1-timestamp-rc-sources.jar? I feel like I've tried every combination I can think of, but I still can't get any of my apis to resolve in my Android Studio project. Can someone please clarify what needs to be done here?

Vinny P

unread,
Apr 10, 2014, 4:06:08 AM4/10/14
to google-a...@googlegroups.com
You should be including the JAR file in the libs directory, then adding the JAR file as a library via the context menu (right click on the file). There's a pictorial explanation of the process here (scroll down to the second answer): http://stackoverflow.com/questions/16608135/android-studio-add-jar-as-library 

 
 
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com

Kevin Day

unread,
Apr 10, 2014, 11:34:02 AM4/10/14
to google-a...@googlegroups.com
Thanks for the response. I did copy the generated jar to the libs directory of my Android Studio project and added it as a library. I see that it was added to my build.gradle. I also added all the dependencies to my build.gradle listed here: https://developers.google.com/appengine/docs/java/endpoints/consume_android#configuring_the_project. Unfortunately, I still am unable to get at my API.

What is confusing is that the .zip that was generated contains the main .jar client library, but there is also a /libs and a /libs-sources folder that contain lots of more .jars. Do I need to add all of these?

Kevin Day

unread,
Apr 13, 2014, 7:35:46 PM4/13/14
to google-a...@googlegroups.com
Looks like I am not the only one having this problem: http://stackoverflow.com/questions/22597097/using-client-library-from-cloud-endpoints-jar-import-not-working

Do people just not use python cloud endpoints or what?

Gaurav

unread,
Jun 29, 2014, 11:46:45 AM6/29/14
to google-a...@googlegroups.com
I am stuck with the same issue. Were you able to find a solution to this?

-Gaurav
Reply all
Reply to author
Forward
0 new messages