[英]Android Studio not generating Mapping folder under Build folder
我只是想嘗試proguard,以查看使用它后我的apk大小會減少多少。我也遵循了android開發者網站上的所有步驟。
但是android studio無法生成映射文件夾,我怎么知道我的應用程序的哪個代碼越來越模糊。
add嘗試通過將此規則添加到proguard文件來更改默認映射文件夾的路徑,但是沒有起作用。 我正在使用android studio生成簽名APK。 -printmapping build/outputs/mapping/release/mapping.txt
apply plugin: 'com.android.application' apply plugin:'com.google.gms.google-services'
android {compileSdkVersion 25 buildToolsVersion '25 .0.2'useLibrary'org.apache.http.legacy'
dexOptions {
incremental true
maxProcessCount 4
javaMaxHeapSize "3g"
}
defaultConfig {
applicationId "com.metronomic.materno"
minSdkVersion 16
targetSdkVersion 25
multiDexEnabled true
// Add the following two lines
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
}
lintOptions {
abortOnError false
}
buildTypes {
release {
debuggable false> minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
}
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
}
productFlavors {
} }}
您有兩次“ buildTypes”塊,最后一個(Android Studio使用的塊)指定“ minifyEnabled false”。
因此,您的任何代碼都不會受到保護。
您不應有2個buildTypes塊。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.