Android Maps V2 App Crashing
Solution 1:
Here a blog post I wrote on how to integrate Google Maps into you application:
Creating Google Map Application
From your error it look like you did not perform correctly steps 2-3 of the blog guide, for adding Google Play services library into your application.
If you follow carefully the steps written in the guide you will end up with the end result you can see at the end of the post.
Solution 2:
I assumed that you have already get Google Maps Android API v2
key and have Google Play services
. If you not have already installed it then please follow below steps to solve this problem_
Step 1. you can found it in
Android SDK Manager
underExtras
tick check box of -Google Play services install it and after complete installation, restart your Eclipse.Step 2. Add library named_
google-play-services_lib
found under theextras
folder of your Android SDK setup folder to your Android project_
Path of google service lib_
{Your_Android_SDK_direct}\extras\google\google_play_services\libproject\google-play-services_lib
Ex. Location of this lib on My system_
C:\Program Files\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib
I hope this will solve your ploblem.
Solution 3:
For me adding:
import com.google.android.gms.maps.SupportMapFragment;
And changing the xml to
<fragment
android:name="com.google.android.gms.maps.SupportMapFragment"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/header" />
resolved the problem. I hope you resolve it too!
Solution 4:
Looks like you didn't add the Google Play Services library to your project.
It's located at {Android SDK}\extras\google\google_play_services
Add it as Android Library Project to Eclipse and then add it to your project.
Post a Comment for "Android Maps V2 App Crashing"