Android: how to add google play services to the project in IDEA

It took several hours to find out how to add google Play services to my project in IDEA.

Finally, I found a comment on StockOverflow

– Create a file ~/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/src/ containing class dummy {}.
– File->Import Module-> ~/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib
– Create Module from Existing Sources
– Next->Next->Next->Next->Finish
– File->Project Structure->Modules->YourApp
– +->Module Dependency->Google-play-services_lib (The + button is in the top right corner of the dialog.)
– +->Jars or directories->~/android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar
– Use the up/down arrows to move to the bottom of the list.
You can delete if you like.

After these instruction complete, you will get something like displayed on picture.

And all this only for new functionality Android Google Maps v2.
Google, seriously?! What is the purpose to break simple and pretty nicely working functionality and make such difficulties?

Leave a Reply

%d bloggers like this: