Skip to content Skip to sidebar Skip to footer

How To Implement Google Maps New Version Of Api V2

Hi every one I came to know that google maps has deprecated its previous version API v1 and introduced a new version of google maps API v2. I tried out one example by following

Solution 1:

Following this guide found on a similar post may be able to help, you need to install 2 .apk files. Source: http://nemanjakovacevic.net/blog/2012/12/how-to-make-android-google-maps-v2-work-in-android-emulator/

Solution 2:

Be sure to name your main activity as you declare it in manifest:

Caused by: java.lang.ClassNotFoundException: com.example.apv.MyMapActivity

Maybe a package naming issue? Post your entire MyMapActivity, not only the onCreate.

Solution 3:

Project properties -> Android -> Add... under Library and pick the google-play-services_lib that you added as a library project earlier according to these instructions:

https://developers.google.com/maps/documentation/android/intro

Solution 4:

The code you provided contains errors. Your activity name is MainActivity but in the manifest file, the only activity you declared has the name MyMapActivity. Also your manifest file doesn't have a opening application tag.

Correcting these two errors, I've run your code and got the exception you mentioned. I fixed the problem by adding the google-play-services library project. I think you forgot to add this or it's not correctly added. You can find details on it in the developer doc of google map v2.

To check this, right click on your project and go to properties. Then select Android from left. At the bottom of this page, you'll find the library projects table. Make sure the google-play-services library project is in the list and have a green mark. If it's not there, add it by clicking the right "Add.." button.

Sometimes, eclipse fails to add library project which is not in the same workspace of your project. If this is your case, keep the google-play-services and your project in the same workspace and then try again.

Solution 5:

check out this youtube tutorial video. It is for beginners and will help you in creating a simple Google Maps V2 app from scratchyoutube link. And as far as running Google Maps V2 on eclipse emulator is concerned see this answer Running Google Maps v2 on emulator

Post a Comment for "How To Implement Google Maps New Version Of Api V2"