0

I spend some hours tring to make a new project with AS 0.4.2 and the result is again a blank map with three errors:

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.
E/Google Maps Android API﹕ Ensure that the following correspond to what is in the API Console: Package Name: com.demomap, API Key: AIzaSyBiYMhCKkRR-rqScAQgbetmVCCBZusgvcE, Certificate Fingerprint: DC37F5B58C2526B6FF8A6A72F8AB7A81D90F0779
E/GetJar SDK [com.zeptolab.ctr.ads]﹕ Usage: UsageRollupDatabase: collectAppSessionEvent() Failed to find or create a reporting window for an event with timestamp 1389656136587, giving up...
E/GetJar SDK [com.zeptolab.ctr.ads]﹕ Usage: UsageRollupDatabase: collectAppSessionEvent() Failed to find or create a reporting window for an event with timestamp 1389656136845, giving up...
E/Google Maps Android API﹕ Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors)

This is what I changed in build.gradle:

apply plugin: 'android'

android {
compileSdkVersion 19
buildToolsVersion "19.0.1"

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
    }
}

dependencies {
    compile 'com.android.support:support-v4:19.0.0'
    compile 'com.android.support:appcompat-v7:19.0.0'
    compile 'com.google.android.gms:play-services:4.0.30'
}

and here is my manifest:

<?xml version="1.0" encoding="utf-8"?>

<permission
    android:name="com.demomap.permission.MAPS_RECEIVE"
    android:protectionLevel="signature"/>
<uses-permission android:name="com.example.osman.permission.MAPS_RECEIVE"/>

<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"/>

<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"/>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

    <activity
        android:name=".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>

    <activity android:name=".BasicMapActivity" android:label="@string/app_name" />
    <activity android:name=".LegalInfoActivity" android:label="@string/app_name" />

    <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="AIzaSyBiYMhCKkRR-rqScAQgbetmVCCBZusgvcE" />
</application>

My app was working correctly wast week and now I don't know what is wrong. Tried to change the key several times and still nothing - only blank map and that message. If I remove that line from the manifest:

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

the app is crashing with this:

Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

Is there anyone who has dealt with a similar problem?

Nikolay Hristov
  • 1,602
  • 1
  • 15
  • 22

0 Answers0