I'm looking for a quick way to identify missing Android permissions. According to Android Tools Project Site here: http://tools.android.com/tips/lint-checks, Android Studio 1.4 is able to check MissingPermission:
MissingPermission
Priority: 9 / 10 Severity: Error Category: Correctness
This check scans through your code and libraries and looks at the APIs being used, and checks this against the set of permissions required to access those APIs. If the code using those APIs is called at runtime, then the program will crash.
Furthermore, for permissions that are revocable (with targetSdkVersion 23), client code must also be prepared to handle the calls throwing an exception if the user rejects the request for permission at runtime.
However, when I try ./gradlew lint check MissingPermission
, the output is:
Task 'MissingPermission' not found in root project 'Android'.
(I have to use the command line because AS always freezes when I use Analyze - Inspect Code
from UI.)
If I run ./gradlew lint
, Lint report doesn't complain missing permission even if I remove android.permission.INTERNET.
Any ideas on this Lint option?