过去,proguard是由project.properties控制的,但不再是这种情况,Android文档还没有更新.project.properties文件现在清楚地表明它是由Android Tools生成的,并且更改将被删除.我已经尝试注释了proguard.config行,但是当我编译时,它重写了project.properties,并继续使用proguard.目前禁用proguard的方法是什么?谢谢!
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt:proguard-google-api-client.txt
# Project target.
target=android-17
android.library.reference.1=../../../../android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib
Run Code Online (Sandbox Code Playgroud)
ahm*_*och 18
设置这个
minifyEnabled false
Run Code Online (Sandbox Code Playgroud)
在你的应用程序中 build.gradle
像这样:
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Run Code Online (Sandbox Code Playgroud)
组
useProguard false
Run Code Online (Sandbox Code Playgroud)
在你的app build.gradle中
喜欢
buildTypes {
release {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
37158 次 |
| 最近记录: |