Android 6.0 Permission Error

前端 未结 5 1679
南笙
南笙 2020-11-28 09:50

I\'m getting this error:

getDeviceId: Neither user 10111 nor current process has android.permission.READ_PHONE_STATE.
   at android.os.Parcel.readException(P         


        
5条回答
  •  旧时难觅i
    2020-11-28 10:50

    We can find all dangerous permissions from https://developer.android.com/guide/topics/permissions/requesting.html

    Yet I think it is a bit annoying to check and request dangerous permissions at runtime.So I just make do with TARGET_SDK_VERSION = 22, a lazy guy (╰_╯)

提交回复
热议问题