Cannot resolve method checkSelfPermission

后端 未结 7 1068
南方客
南方客 2021-02-19 14:58

I\'m trying to make my app ready for Android 6 and now I\'m stuck to the point where you need to request and check permissions.

I tried the following from the docs:

7条回答
  •  后悔当初
    2021-02-19 15:53

    I had the same problem. In my case I added a library that was using an old appcompat version, then the compiler could not find the right appcompat.

    To fix the problem I added the option {transitive = false} while importing the culprit library, and this fixed the problem.

    Now I have:

    api ('org.library.using.old.appcompat:1.0.1') {transitive = false}

提交回复
热议问题