I am trying to embed Google Maps into my app. Below is my xml file:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
android:name="com.google.android.gms.maps.SupportMapFragment"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>
</LinearLayout>
Here is the main class file:
package com.em.basicmap;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
public class MainActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.em.basimap"
android:versionCode="1"
android:versionName="1.0" >
<permission android:name="com.em.MAPS_RECIEVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.em.MAPS_RECIEVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="com.google.android.providers.gsf.permissions.READ_GSERVICES"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.em.basicmap.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCrstFrx_Mj8PaBJYtSH6bk62kggzstYzM"/>
</application>
</manifest>
I have tried everything I can think of. I have made sure that I have Google Maps Android API in the google apis. I have renewed my debugging key many times, I have downloaded the google-play services and I have copied the lib jar into my directory. I have ensure that my target sdk is Google api 17, I have included all of the permissions that I could find that I might need. I've looked all over StackOverflow for help, and the above are the help that I could find, but my app still displays a blank screen and zoom buttons. I'm really at a loss for what to do now. Are there some other things I have not done correctly? How might my access my SHA1 code? I have done it through the command line and eclipse, but my logcat says that it may still be an authorization issue.