0

As there is no mapView in Android studio, I was trying to add Map Like this:

 <fragment
        android:id="@+id/map"
        android:name="com.google.android.gms.maps.MapFragment"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

But it is showing rendering Problems. Please see the Image for Details..

enter image description here

Istiak Morsalin
  • 10,621
  • 9
  • 33
  • 65
  • So what if Android Studio is showing rendering problems, does the build go thru and the app works or ... ? – Shark Feb 04 '16 at 15:13

2 Answers2

1

Adding google maps to your app is very simple. Just create an activity and select maps activity and all the things will be automatically done by android studio. You only need to put your google maps api key. For more details you can check my blog where I written a tutorial about android google maps.

Belal Khan
  • 2,099
  • 2
  • 22
  • 32
1

You can add layout like that.its working fine for me and select map activity instead of blank activity

Add the dependency in gradle 
{
compile 'com.google.android.gms:play-services:8.1.0'
}


<fragment xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/map"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/spr_place_type"
        class="com.google.android.gms.maps.SupportMapFragment" />
Vijay Prakash
  • 111
  • 11