How to remove these unnecessary permissions
I am building a project using android-studio gradle build system. I have two permissions below
android.permission.ACCESS_NETWORK_STATE
android.permission.INTERNET
but the build system automatically adds these new permissions.
android.permission.READ_EXTERNAL_STORAGE maxSdkVersion=18 android.permission.READ_PHONE_STATE android.permission.WRITE_EXTERNAL_STORAGE maxSdkVersion=18
I don't understand why these permissions are added. And how do I remove these permissions?
Here is my build config
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "my.app.package.name"
minSdkVersion 8
targetSdkVersion 20
versionCode 2
versionName "1.0.1"
}
signingConfigs {
debug {
storeFile file(System.getProperty("user.home")+"/.android/debug.keystore")
}
release {
storeFile file("keystore.jks")
storePassword "password"
keyAlias "alias"
keyPassword "password"
}
}
buildTypes {
/*release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}*/
marketShareRelease {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'com.viewpagerindicator:library:2.4.1'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.commonsware.cwac:merge:1.0.2'
}
My previous build is pretty much the same (Oct 8, 2014). Just android studio and sdk are updated
+3
source to share
1 answer
One of your libraries has targetSdk <= 4. (Looks like your cwac-merge)
This causes permissions to be automatically added: http://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE
+2
source to share