I am currently porting the application to target API 23.
I need time to understand why accountManager.getAccountsByType("com.google") no longer works. This is due to the new Marshmallow permission model - http://developer.android.com/intl/es/training/permissions/requesting.html
I am using Android Studio 1.5.1
According to http://tools.android.com/tips/lint-checks , I expect lint to be able to warn me about 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; } } }
I checked the lint installed on my system. I can confirm that the MissingPermission function exists through
c:\adt-bundle-windows-x86_64-20140624\sdk\tools\lint.bat --show
But I did not receive a warning in Android Studio. I checked the lint setup in Android Studio.

It seems that I do not see the option "Missing permission" there.
Is there something wrong with the settings in Android Studio?
I can see how the EverNote team once reported an error regarding lint checking for missing permissions - https://code.google.com/p/android/issues/detail?id=182165 But this has been fixed since Android Studio 1.4
source share