皮棉Android Studio中1.5.1工作不缺少权限检测 [英] Lint in Android Studio 1.5.1 is not working for missing permissions detection
问题描述
目前,我在迁移我的应用程序为目标API 23的过程。
Currently, I'm in the process of migrating my app to target API 23.
我花了一段时间来弄清楚为什么 accountManager.getAccountsByType(com.google)
不再起作用。这是由于新的棉花糖权限模型 - http://developer.android。 COM /国际/ ES /培训/许可/ requesting.html
It takes me a while to figure out why accountManager.getAccountsByType("com.google")
no longer work. This is due to new Marshmallow permission model - http://developer.android.com/intl/es/training/permissions/requesting.html
我使用的Android 1.5.1工作室
I'm using Android Studio 1.5.1
根据 http://tools.android.com/tips/lint-checks,我期待能够皮棉警告我以下code,根据 MissingPermission
According to http://tools.android.com/tips/lint-checks, I'm expecting lint able to warn me for the following code, based on 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;
}
}
}
我检查安装在我的系统中的绒毛。我可以确认的 MissingPermission 的特点是有通过
c:\adt-bundle-windows-x86_64-20140624\sdk\tools\lint.bat --show
不过,我Android Studio中没有收到任何警告。我测试过Android Studio中皮棉设置。
But, I received no warning in Android Studio. I had checked the lint setting in Android Studio.
看来,
我看不出有什么缺少权限选项。
It seems that I don't see any "Missing permission" option there.
这有什么错我的Android Studio设置?
Is there anything wrong with my Android Studio settings?
我可以看到Evernote的团队曾经就文件检查皮棉失踪权限的bug报告 - 的 HTTPS://$c$c.google.com/p/android/issues/detail ID = 182165 但由于Android 1.4工作室
I can see EverNote team once file a bug report regarding lint checking on missing permissions - https://code.google.com/p/android/issues/detail?id=182165 But it is fixed since Android Studio 1.4
推荐答案
我使用的是Android 2.0工作室测试版2
I am using Android Studio 2.0 Beta 2
我有一对情侣在不同类别失踪的权限设置你检查其他类别?
I do have a couple of missing permission settings in different categories have you checked other categories?
编辑: MissingPermission
似乎没有任何这些
这篇关于皮棉Android Studio中1.5.1工作不缺少权限检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!