0

I'm trying to use google maps v2 for android by adding the google-play-services to my app as a library. Everytime I set a reference to the library I get windows dialog with the message that aapt.exe has crashed. And after I've set a reference to the library all my source files get errors. R.java in my gen folder gets deleted. Console is giving this message

[google-play-services_lib] R.java was modified manually! Reverting to generated version!

After deleting the reference to the google-play-services library the errors disappear. I'm using Eclipse Helio with SDK tools rev 22.0.1

I tried almost every solution/suggestion people have told in that thread.

Can someone help me out?

mXX
  • 3,595
  • 12
  • 44
  • 61
  • Do you also have the Android SDK Build-tools package? It's new, not the same as Platform-tools package. Maybe that has something to do with it... – Karakuri Jun 05 '13 at 20:20
  • Yeah I have both. So you suggest to delete build-tools? – mXX Jun 05 '13 at 20:25
  • No, do not delete build tools. How are you referencing the Google Play Services in your project? – Karakuri Jun 05 '13 at 21:05
  • I've imported the library in my ecplise workingspace. Then on my actuall app I've done right click > properties > android > Add google play services. Then pressing ok library updates and then I'm getting the errors – mXX Jun 05 '13 at 21:11
  • If you haven't yet (but you probably have), maybe try Project > Clean on both of them. Otherwise I would try removing the Google Play Services project and importing it again. – Karakuri Jun 05 '13 at 21:52
  • I already did this multiple times and download other copy of Google Play Services and imported it again. Other suggestion? – mXX Jun 05 '13 at 21:53

2 Answers2

2

After you add the Google-play-services_lib to your project using eclipse project properties, you go to view project.properties file in your project folder ( a simple text file that you can edit). Check if the android.library.reference.1="your Google-play-services_lib path" is correct.
You don't need to copy Google-play-services_lib folder to your project like in Google instruction, but the path in project.properties should be correct. I prefer full path like "c:\android-sdk..." .
Eclipse creates a relative path which is wrong. It worked for me after I corrected the path.

Hulk1991
  • 3,079
  • 13
  • 31
  • 46
Tng
  • 574
  • 5
  • 5
0

I realize it's 18 months later now. I couldn't get google-play-services_lib to work as a lib projecte in the Android tab in project settings. But importing it as an Android project and referencing it as a project (in the "projects" tab in Java Build Path) did work.

Christine
  • 5,617
  • 4
  • 38
  • 61