I've been reading the tutorial of "Getting started" of Google Maps API Google Maps Android API v2 and my map doesn't show up...
I've created a class called "MapTest.java" and a xml called "map_test.xml"
The "MapTest.java"
public class MapsTest extends android.support.v4.app.Fragment {
View rootView;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.maps_test,container,false);
return rootView;
}
}
And the "map_test.xml"
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/> //<--- An error appeared.
On my Android Manifest I've included all of the Uses-permisions, but I don't know what i'm doing wrong...
And by the way on my AndroidManifest I've included this :
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyC87hhgd6kKJZUMe5ZBC6ybeO2nQNX4KZc" />
Hope you can help me. Cheers.
No comments:
Post a Comment