Android Studio 1.5.1中的Lint不适用于缺少权限检测

Che*_*eng 5 android android-studio

目前,我正在将我的应用迁移到目标API 23.

我花了一段时间才弄清楚为什么accountManager.getAccountsByType("com.google")不再工作.这是由于新的Marshmallow权限模型 - http://developer.android.com/intl/es/training/permissions/requesting.html

我正在使用Android Studio 1.5.1

根据http://tools.android.com/tips/lint-checks,我希望lint能够警告我以下代码,基于MissingPermission

public static String getEmail() {
    Pattern emailPattern = Patterns.EMAIL_ADDRESS; // API level 8+
    AccountManager accountManager = AccountManager.get(MyApplication.instance());
    Account[] accounts = accountManager.getAccountsByType("com.google");

    for (Account account : accounts) {
        if (emailPattern.matcher(account.name).matches()) {
            String possibleEmail = account.name;
            return possibleEmail;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

我检查了系统中安装的lint.我可以通过确认MissingPermission功能

c:\adt-bundle-windows-x86_64-20140624\sdk\tools\lint.bat --show
Run Code Online (Sandbox Code Playgroud)

但是,我在Android Studio中没有收到任何警告.我检查了Android Studio中的lint设置.

在此输入图像描述

似乎我没有看到任何"遗失许可"选项.

我的Android Studio设置有什么问题吗?

我可以看到EverNote团队一旦提交有关丢失权限的lint检查的错误报告 - https://code.google.com/p/android/issues/detail?id=182165但是自Android Studio 1.4以来它已修复

mad*_*mad 0

我正在使用 Android Studio 2.0 Beta 2

我确实在不同类别中缺少一些权限设置,您检查过其他类别吗?

Lint 权限

编辑: MissingPermission似乎不是其中任何一个。