I have read all the similar questions and did everything that was described in them, but did not help.
Google Maps API v2 is Enabled and API key is correct
I just chose GoogleMapsActivity in "New project", then created a key.jks, created sha1 by keytool, created public api access key, put my API key in manifest.
I tried:
clean-rebuild-unistall app-install
updated api key many times
create a new project with the new key.jks (and all over again)
delete and create api key
Here is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dandewine.user.thinkmobiletest" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use Google Maps Android API v2, but are recommended. -->
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIza**************************" />
<activity
android:name=".ActivityMain"
android:label="@string/title_activity_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Here is my activity:
public class ActivityMain extends FragmentActivity implements OnMapReadyCallback {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_map);
SupportMapFragment mapFragment = (SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@Override
public void onMapReady(GoogleMap googleMap) {
googleMap.addMarker(new MarkerOptions()
.position(new LatLng(0, 0))
.title("Marker"));
}
Logcat:
E/Google Maps Android API﹕ Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
07-27 14:52:37.551 25002-25035/com.dandewine.user.thinkmobiletest E/Google Maps Android API﹕ In the Google Developer Console (https://console.developers.google.com)
Ensure that the "Google Maps Android API v2" is enabled.
Ensure that the following Android Key exists:
API Key: AIza****************************
Android Application (<cert_fingerprint>;<package_name>): 8C:2B:4C:F7:CF:FB:EC:D5:DC:D7:D0:5D:6E:30:49:74:97:18:57:88;com.dandewine.user.thinkmobiletest
UPDATE: I have different SHA1 fingerprints in google dev. console and in logs, how to deal with that?
Can anyone help with advice.