I am trying to make an application as a school project and I MUST implement Google Maps. I am fairly new to Android coding and now little of Java. So far I created this application using Google Maps API v2, I obtained a key, I added all the permissions and code in the manifest, I added the default Google example code to make a map simply appear but I get a crash and lots of errors when running the application. I also added existing code and set it to project library, I set target and compile with to be specifically with the API’s. I keep “banging my head” trying to get this to work. I saw other questions have similar problems but resolved with something I already have completed.
Since I’m having troubles adding code by text, I hope you guys can understand I used exactly what Google posted as their tutorial. I can’t do images due to my rep.
I am trying to make an application as a school project and I MUST
Share
I managed to fix this thanks to newbostonforums and I am adding my findings for anyone else seeking help. You need to add google-play-services_lib to your project.
Right click IMPORT
Android->Existing Code->(SDK/extras/google/google_play_services/libproject/google-play-services_lib)
Right click on project. Properties->Android->Library-ADD->(SDK/extras/google/google_play_services/libproject/google-play-services_lib
Once you added the folder it will be “linked” with the project.
In JAVA you must add
MAKE SURE YOU IMPORT ALL RED UNDERLINED.
Then your XML can be at your choosing but it must include
You may replace android:name with class but I don’t know the difference. I believe they both work.
However there are many ways to make it work and I am somewhat changing this method.