Google Maps API displaying grey screen instead of map view on Android
I am trying to display the Google map on Android. When I load the activity i get a grey screen with the Google logo displayed in the bottom left corner. This happens using the virtual emulator and on a real device too. I have tried using a different Api key but get the same problem. I am using the Map activity provided by Android studio.
build.gradle(Module:app)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="">
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="true" />
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="true" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gfs.permission.READ_GSERVICES" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".Activities.LandingActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".UserAccountActivities.ProfileActivity" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="redacted" />
<activity
android:name=".Activities.MapsActivity"
android:label="@string/title_activity_maps" />
</application>
</manifest>
Logcat in Error mode
01-02 15:06:24.913 17090-17160/E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
01-02 15:06:24.923 17090-17160/ 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: ***
Android Application (<cert_fingerprint>;<package_name>): ***;

|
show 5 more comments
I am trying to display the Google map on Android. When I load the activity i get a grey screen with the Google logo displayed in the bottom left corner. This happens using the virtual emulator and on a real device too. I have tried using a different Api key but get the same problem. I am using the Map activity provided by Android studio.
build.gradle(Module:app)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="">
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="true" />
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="true" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gfs.permission.READ_GSERVICES" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".Activities.LandingActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".UserAccountActivities.ProfileActivity" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="redacted" />
<activity
android:name=".Activities.MapsActivity"
android:label="@string/title_activity_maps" />
</application>
</manifest>
Logcat in Error mode
01-02 15:06:24.913 17090-17160/E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
01-02 15:06:24.923 17090-17160/ 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: ***
Android Application (<cert_fingerprint>;<package_name>): ***;

post the logcat
– Jarin Rocks
Jan 2 at 14:43
Possible duplicate of java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion
– Martin Zeitler
Jan 2 at 14:49
Tried the solution from this and it did not solve my problem.
– user10431501
Jan 2 at 14:57
Make sure you callonCreate()andonResume()on theMapView.
– greeble31
Jan 2 at 15:02
@user10431501 add thelogcatoutput. else this merely is guessing. if you havetargetSdkVersion 28without legacy support, as the duplicate question hints for, it will certainly crash on an API 28 emulator, not an API 27 emulator.
– Martin Zeitler
Jan 2 at 15:06
|
show 5 more comments
I am trying to display the Google map on Android. When I load the activity i get a grey screen with the Google logo displayed in the bottom left corner. This happens using the virtual emulator and on a real device too. I have tried using a different Api key but get the same problem. I am using the Map activity provided by Android studio.
build.gradle(Module:app)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="">
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="true" />
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="true" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gfs.permission.READ_GSERVICES" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".Activities.LandingActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".UserAccountActivities.ProfileActivity" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="redacted" />
<activity
android:name=".Activities.MapsActivity"
android:label="@string/title_activity_maps" />
</application>
</manifest>
Logcat in Error mode
01-02 15:06:24.913 17090-17160/E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
01-02 15:06:24.923 17090-17160/ 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: ***
Android Application (<cert_fingerprint>;<package_name>): ***;

I am trying to display the Google map on Android. When I load the activity i get a grey screen with the Google logo displayed in the bottom left corner. This happens using the virtual emulator and on a real device too. I have tried using a different Api key but get the same problem. I am using the Map activity provided by Android studio.
build.gradle(Module:app)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
}
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="">
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="true" />
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="true" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gfs.permission.READ_GSERVICES" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".Activities.LandingActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".UserAccountActivities.ProfileActivity" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="redacted" />
<activity
android:name=".Activities.MapsActivity"
android:label="@string/title_activity_maps" />
</application>
</manifest>
Logcat in Error mode
01-02 15:06:24.913 17090-17160/E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
01-02 15:06:24.923 17090-17160/ 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: ***
Android Application (<cert_fingerprint>;<package_name>): ***;

edited Jan 2 at 16:00
user10431501
asked Jan 2 at 14:41
user10431501user10431501
448
448
post the logcat
– Jarin Rocks
Jan 2 at 14:43
Possible duplicate of java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion
– Martin Zeitler
Jan 2 at 14:49
Tried the solution from this and it did not solve my problem.
– user10431501
Jan 2 at 14:57
Make sure you callonCreate()andonResume()on theMapView.
– greeble31
Jan 2 at 15:02
@user10431501 add thelogcatoutput. else this merely is guessing. if you havetargetSdkVersion 28without legacy support, as the duplicate question hints for, it will certainly crash on an API 28 emulator, not an API 27 emulator.
– Martin Zeitler
Jan 2 at 15:06
|
show 5 more comments
post the logcat
– Jarin Rocks
Jan 2 at 14:43
Possible duplicate of java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion
– Martin Zeitler
Jan 2 at 14:49
Tried the solution from this and it did not solve my problem.
– user10431501
Jan 2 at 14:57
Make sure you callonCreate()andonResume()on theMapView.
– greeble31
Jan 2 at 15:02
@user10431501 add thelogcatoutput. else this merely is guessing. if you havetargetSdkVersion 28without legacy support, as the duplicate question hints for, it will certainly crash on an API 28 emulator, not an API 27 emulator.
– Martin Zeitler
Jan 2 at 15:06
post the logcat
– Jarin Rocks
Jan 2 at 14:43
post the logcat
– Jarin Rocks
Jan 2 at 14:43
Possible duplicate of java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion
– Martin Zeitler
Jan 2 at 14:49
Possible duplicate of java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion
– Martin Zeitler
Jan 2 at 14:49
Tried the solution from this and it did not solve my problem.
– user10431501
Jan 2 at 14:57
Tried the solution from this and it did not solve my problem.
– user10431501
Jan 2 at 14:57
Make sure you call
onCreate() and onResume() on the MapView.– greeble31
Jan 2 at 15:02
Make sure you call
onCreate() and onResume() on the MapView.– greeble31
Jan 2 at 15:02
@user10431501 add the
logcat output. else this merely is guessing. if you have targetSdkVersion 28 without legacy support, as the duplicate question hints for, it will certainly crash on an API 28 emulator, not an API 27 emulator.– Martin Zeitler
Jan 2 at 15:06
@user10431501 add the
logcat output. else this merely is guessing. if you have targetSdkVersion 28 without legacy support, as the duplicate question hints for, it will certainly crash on an API 28 emulator, not an API 27 emulator.– Martin Zeitler
Jan 2 at 15:06
|
show 5 more comments
2 Answers
2
active
oldest
votes
go to Google console and try to enable maps sdk for android...
I have gotten a new key three times.
– user10431501
Jan 2 at 15:27
the correct key is the one you get from the google console
– Ayodele Kayode
Jan 2 at 15:33
I went to the console changed it to this key and same problem.
– user10431501
Jan 2 at 15:37
And it is set to enabled.
– user10431501
Jan 2 at 15:38
I have included screenshot.
– user10431501
Jan 2 at 16:01
|
show 3 more comments
try to change the hardware-sensors to not required:
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="false"/>
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="false"/>
and also this permission is not required anymore, for years:
<uses-permission android:name="com.google.android.providers.gfs.permission.READ_GSERVICES" />
and the problem actually stems from:
apply plugin: "com.google.gms.google-services"
which has to be moved to the very bottom of the file.
both of them are related to a different part of the project, however i did try setting them to false and it did not solve the problem.
– user10431501
Jan 2 at 15:07
I have moved this line to the very bottom however same problem.
– user10431501
Jan 2 at 15:23
@user10431501 then you have to take thelogcatoutput literally and a) check that indeed the correct API key is being used (also check for possible API limitations set) and also, that the Maps API had been enabled.
– Martin Zeitler
Jan 2 at 17:23
I have the problem solved, thanks for your help
– user10431501
Jan 2 at 19:45
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008285%2fgoogle-maps-api-displaying-grey-screen-instead-of-map-view-on-android%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
go to Google console and try to enable maps sdk for android...
I have gotten a new key three times.
– user10431501
Jan 2 at 15:27
the correct key is the one you get from the google console
– Ayodele Kayode
Jan 2 at 15:33
I went to the console changed it to this key and same problem.
– user10431501
Jan 2 at 15:37
And it is set to enabled.
– user10431501
Jan 2 at 15:38
I have included screenshot.
– user10431501
Jan 2 at 16:01
|
show 3 more comments
go to Google console and try to enable maps sdk for android...
I have gotten a new key three times.
– user10431501
Jan 2 at 15:27
the correct key is the one you get from the google console
– Ayodele Kayode
Jan 2 at 15:33
I went to the console changed it to this key and same problem.
– user10431501
Jan 2 at 15:37
And it is set to enabled.
– user10431501
Jan 2 at 15:38
I have included screenshot.
– user10431501
Jan 2 at 16:01
|
show 3 more comments
go to Google console and try to enable maps sdk for android...
go to Google console and try to enable maps sdk for android...
answered Jan 2 at 15:18
Ayodele KayodeAyodele Kayode
11928
11928
I have gotten a new key three times.
– user10431501
Jan 2 at 15:27
the correct key is the one you get from the google console
– Ayodele Kayode
Jan 2 at 15:33
I went to the console changed it to this key and same problem.
– user10431501
Jan 2 at 15:37
And it is set to enabled.
– user10431501
Jan 2 at 15:38
I have included screenshot.
– user10431501
Jan 2 at 16:01
|
show 3 more comments
I have gotten a new key three times.
– user10431501
Jan 2 at 15:27
the correct key is the one you get from the google console
– Ayodele Kayode
Jan 2 at 15:33
I went to the console changed it to this key and same problem.
– user10431501
Jan 2 at 15:37
And it is set to enabled.
– user10431501
Jan 2 at 15:38
I have included screenshot.
– user10431501
Jan 2 at 16:01
I have gotten a new key three times.
– user10431501
Jan 2 at 15:27
I have gotten a new key three times.
– user10431501
Jan 2 at 15:27
the correct key is the one you get from the google console
– Ayodele Kayode
Jan 2 at 15:33
the correct key is the one you get from the google console
– Ayodele Kayode
Jan 2 at 15:33
I went to the console changed it to this key and same problem.
– user10431501
Jan 2 at 15:37
I went to the console changed it to this key and same problem.
– user10431501
Jan 2 at 15:37
And it is set to enabled.
– user10431501
Jan 2 at 15:38
And it is set to enabled.
– user10431501
Jan 2 at 15:38
I have included screenshot.
– user10431501
Jan 2 at 16:01
I have included screenshot.
– user10431501
Jan 2 at 16:01
|
show 3 more comments
try to change the hardware-sensors to not required:
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="false"/>
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="false"/>
and also this permission is not required anymore, for years:
<uses-permission android:name="com.google.android.providers.gfs.permission.READ_GSERVICES" />
and the problem actually stems from:
apply plugin: "com.google.gms.google-services"
which has to be moved to the very bottom of the file.
both of them are related to a different part of the project, however i did try setting them to false and it did not solve the problem.
– user10431501
Jan 2 at 15:07
I have moved this line to the very bottom however same problem.
– user10431501
Jan 2 at 15:23
@user10431501 then you have to take thelogcatoutput literally and a) check that indeed the correct API key is being used (also check for possible API limitations set) and also, that the Maps API had been enabled.
– Martin Zeitler
Jan 2 at 17:23
I have the problem solved, thanks for your help
– user10431501
Jan 2 at 19:45
add a comment |
try to change the hardware-sensors to not required:
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="false"/>
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="false"/>
and also this permission is not required anymore, for years:
<uses-permission android:name="com.google.android.providers.gfs.permission.READ_GSERVICES" />
and the problem actually stems from:
apply plugin: "com.google.gms.google-services"
which has to be moved to the very bottom of the file.
both of them are related to a different part of the project, however i did try setting them to false and it did not solve the problem.
– user10431501
Jan 2 at 15:07
I have moved this line to the very bottom however same problem.
– user10431501
Jan 2 at 15:23
@user10431501 then you have to take thelogcatoutput literally and a) check that indeed the correct API key is being used (also check for possible API limitations set) and also, that the Maps API had been enabled.
– Martin Zeitler
Jan 2 at 17:23
I have the problem solved, thanks for your help
– user10431501
Jan 2 at 19:45
add a comment |
try to change the hardware-sensors to not required:
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="false"/>
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="false"/>
and also this permission is not required anymore, for years:
<uses-permission android:name="com.google.android.providers.gfs.permission.READ_GSERVICES" />
and the problem actually stems from:
apply plugin: "com.google.gms.google-services"
which has to be moved to the very bottom of the file.
try to change the hardware-sensors to not required:
<uses-feature
android:name="android.hardware.sensor.stepcounter"
android:required="false"/>
<uses-feature
android:name="android.hardware.sensor.stepdetector"
android:required="false"/>
and also this permission is not required anymore, for years:
<uses-permission android:name="com.google.android.providers.gfs.permission.READ_GSERVICES" />
and the problem actually stems from:
apply plugin: "com.google.gms.google-services"
which has to be moved to the very bottom of the file.
edited Jan 2 at 15:17
answered Jan 2 at 15:03
Martin ZeitlerMartin Zeitler
19k34373
19k34373
both of them are related to a different part of the project, however i did try setting them to false and it did not solve the problem.
– user10431501
Jan 2 at 15:07
I have moved this line to the very bottom however same problem.
– user10431501
Jan 2 at 15:23
@user10431501 then you have to take thelogcatoutput literally and a) check that indeed the correct API key is being used (also check for possible API limitations set) and also, that the Maps API had been enabled.
– Martin Zeitler
Jan 2 at 17:23
I have the problem solved, thanks for your help
– user10431501
Jan 2 at 19:45
add a comment |
both of them are related to a different part of the project, however i did try setting them to false and it did not solve the problem.
– user10431501
Jan 2 at 15:07
I have moved this line to the very bottom however same problem.
– user10431501
Jan 2 at 15:23
@user10431501 then you have to take thelogcatoutput literally and a) check that indeed the correct API key is being used (also check for possible API limitations set) and also, that the Maps API had been enabled.
– Martin Zeitler
Jan 2 at 17:23
I have the problem solved, thanks for your help
– user10431501
Jan 2 at 19:45
both of them are related to a different part of the project, however i did try setting them to false and it did not solve the problem.
– user10431501
Jan 2 at 15:07
both of them are related to a different part of the project, however i did try setting them to false and it did not solve the problem.
– user10431501
Jan 2 at 15:07
I have moved this line to the very bottom however same problem.
– user10431501
Jan 2 at 15:23
I have moved this line to the very bottom however same problem.
– user10431501
Jan 2 at 15:23
@user10431501 then you have to take the
logcat output literally and a) check that indeed the correct API key is being used (also check for possible API limitations set) and also, that the Maps API had been enabled.– Martin Zeitler
Jan 2 at 17:23
@user10431501 then you have to take the
logcat output literally and a) check that indeed the correct API key is being used (also check for possible API limitations set) and also, that the Maps API had been enabled.– Martin Zeitler
Jan 2 at 17:23
I have the problem solved, thanks for your help
– user10431501
Jan 2 at 19:45
I have the problem solved, thanks for your help
– user10431501
Jan 2 at 19:45
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54008285%2fgoogle-maps-api-displaying-grey-screen-instead-of-map-view-on-android%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
post the logcat
– Jarin Rocks
Jan 2 at 14:43
Possible duplicate of java.lang.NoClassDefFoundError:failed resolution of :Lorg/apache/http/ProtocolVersion
– Martin Zeitler
Jan 2 at 14:49
Tried the solution from this and it did not solve my problem.
– user10431501
Jan 2 at 14:57
Make sure you call
onCreate()andonResume()on theMapView.– greeble31
Jan 2 at 15:02
@user10431501 add the
logcatoutput. else this merely is guessing. if you havetargetSdkVersion 28without legacy support, as the duplicate question hints for, it will certainly crash on an API 28 emulator, not an API 27 emulator.– Martin Zeitler
Jan 2 at 15:06