Skip to content Skip to sidebar Skip to footer

Android : Google Map Api Version 2

I follow steps for configure Google Maps Android API v2 Official steps I am using Android 3.1 version. I am getting error which I run project. Manifest file

Solution 1:

First install Google play service and if you are using Android 2.2 then use this code

publicclassMainActivityextendsFragmentActivity {    
    @OverrideprotectedvoidonCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);    
        SupportMapFragmentfragment=newSupportMapFragment();
        getSupportFragmentManager().beginTransaction().add(android.R.id.content, fragment).commit();
    }    
    @OverridepublicbooleanonCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        returntrue;
    }
}

Solution 2:

You should try import google play libs in this guide

Solution 3:

I faced a similar problem, and I solved that issue with the following scenario steps:

-1- I downloaded the latest ADT (the windows 64 bit version 23.0.3) in order to install the Google play services API.

-2- The problem existed still, tried @user3469294 answer in this link.

There is something wrong with ADT 64 bit version, when it comes to using the SupportMapFragment (keeps crashing), downloading ADT for 32 bit and installing google play services API on it's SDK then using it's library solved my problem.

Post a Comment for "Android : Google Map Api Version 2"