I got MISSING_PERMISSION issue Here maps Android

纵然是瞬间 提交于 2019-12-12 20:23:52

问题


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



来源:https://stackoverflow.com/questions/36364047/i-got-missing-permission-issue-here-maps-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!