I got MISSING_PERMISSION issue Here maps Android

2019-07-15 06:38发布

问题:

I'm trying an application just show Here map on screen. I've followed all of steps in document of Here + provided app_id, app_code, license key + provided 6 permissions in AndroidManifest.xml.

But It got the following issue:

"ERROR: Cannot initialize Map Fragment: MISSING_PERMISSION"

I'm using gradle 2.8, targetSdkVersion 23, compileSdkVersion 23

回答1:

Android 6 / API 23 has a new permission system, that means you have to request critical permissions from the user. See Android docs: https://developer.android.com/training/permissions/requesting.html

Just adding the critical permissions to the manifest is not enough anymore.

If you don't want to do this, you can still set traget API level to 22 and work in legacy mode, but to be more future proof, you should implement the new Android6 way of requesting permissions.

The critical permissions in the HERE SDK that you have to request are: ACCESS_FINE_LOCATION and WRITE_EXTERNAL_STORAGE



回答2:

Make sure you are using android runtime permission on for location access as from marshmallow onward all the OS need permission to run