Question

I'm developing an app for Google map from command line using ANT. How can I import the Google play services library to my project using Ant. I tried updating the project using this command:

./android update project --target 2 --path Googlemaps --library /home/shvetajeevan/Downloads/android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib/

But when I clean the project it gives 'Build Failed' Error. Have I missed anything else. This is My Project.properties file

 target=Google Inc.:Google APIs:19
 android.library.reference.1=/home/shvetajeevan/Downloads/android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib/

I get error when I clean project

Buildfile: /home/shvetajeevan/Downloads/android-sdk-linux/tools/Googlemaps/build.xml

 -check-env:
 [checkenv] Android SDK Tools Revision 22.6.3
 [checkenv] Installed at /home/shvetajeevan/Downloads/android-sdk-linux

 -setup:
 [echo] Project Name: Googlemaps
 [gettype] Project Type: Application

 -pre-clean:

  clean:

  BUILD FAILED
   /home/shvetajeevan/Downloads/android-sdk-linux/tools/ant/build.xml:460:          
  /home/shvetajeevan/Downloads/android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib/ resolve to a    
  path with no project.properties file for project /home/shvetajeevan/Downloads/android-sdk-l   inux/tools/Googlemaps
Was it helpful?

Solution

Since the Play Services library is not set up for Ant builds, this will not directly work.

First, you should copy the Play Services library someplace outside of your Android SDK. Then, run android update project from the library project's main directory to create its own build.xml and project.properties files.

That should allow you to build projects that depend upon this library project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top