0

I am working on an app that uses the google maps api. To do this I have to include the google play services project. I was able to get it to work in eclipse, but I now have to get the project to build using apache ant. I have modified the project.properties file to include the following reference:

android.library.reference.1=../../../../../Android/adt-bundle-windows-x86_64-20140702/sdk/extras/google/google_play_services/libproject/google-play-services_lib

which at least gets it to try to access the project, but when I try to build the project I get the following error:

Invalid file: C:\Android\adt-bundle-windows-x86_64-20140702\sdk\extras\google\google_play_services\libproject\google-play-services_lib\build.xml

I looked at the location it was accessing and there is no build file inside the google-play-services_lib folder. I am new to using apache ant to build android projects and I am not sure what the proper way to get it to work with the google play library is since it has to reference the project not just a jar file.

What else is necessary to get the project to build properly with ant?

Thanks

Edit:

I modified the set up so that I now reference a copy of the project in the location of my project, however the issue remains the same that ant is looking for a build file for the google play services project that does not exist.

Zafer Celaloglu
  • 1,438
  • 1
  • 17
  • 28
Jake Gearhart
  • 297
  • 7
  • 21

1 Answers1

0

You need to create a seperate project for Google Play Services and link to that project from your main one. Make sure you read the setup guide: http://developer.android.com/google/play-services/setup.html

Chris Feist
  • 1,678
  • 15
  • 17
  • I doubt that will solve the issue seeing as my main problem is with ant trying to find a build file. Copying the project and referencing it from a different spot will not help what appears to be the actual problem. – Jake Gearhart Aug 13 '14 at 19:25
  • It worked for me. There was issues with ant building from the Android SDK directory due to the reference in the main project's manifest to the `google_play_services_version`. How about you try it since that's exactly how Google says to set it up :) – Chris Feist Aug 13 '14 at 19:29
  • I gave it a shot, and updated my question accordingly. I hit the same issue, but at the very least I can have my reference be simply ./google-play-services_lib because it is in the current directory so that is a nice change. – Jake Gearhart Aug 13 '14 at 19:32
  • You would have needed that anyways. Try one of the solutions under this question: http://stackoverflow.com/questions/15718907/how-to-create-build-xml-for-an-android-project – Chris Feist Aug 13 '14 at 19:38
  • Also, if you have the default build.xml under your main project, you can probably just copy it to the Google Play project folder. – Chris Feist Aug 13 '14 at 19:41
  • I got the build.xml document generated, but now when I run the build again it gets further, but it fails saying that it is using an invalid resource directory name: {google services location}\bin\res/crunch. any ideas? – Jake Gearhart Aug 13 '14 at 22:03