Google Play Services automatically add new permissions

com.google.android.gms:play-services-ads:7.5.0

Issue

After upgrading Google Play Services from 6.1.11 to 7.5.0, bunch of new permissions are automatically added to the application’s manifest.

Android Permissions

The app actually only uses Admob (Google Mobile Ads) libraries from Google Play Services and permissions such as “ACCESS_COARSE_LOCATION”, “ACCESS_ACCOUNTS”, “USE_CREDENTIALS” are completely unnecessary.

 

 

Resolution

Since Google Play Services version 6.5 you can selectively compile only APIs you intend to use, instead of compiling entire Google Play Services package into your app. This way only permissions required for these specific APIs will be added. In case of Admob Advertising, you should use:


compile 'com.google.android.gms:play-services-ads:7.5.0'

That’s instead of compile ‘com.google.android.gms:play-services:7.5.0’

For more info check this Google Developers article.

Android Studio 1.2.2

 

 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *