如何禁用ProGuard的建设我的Andr​​oid应用程序?我的、应用程序、ProGuard、oid

2023-09-07 04:36:04 作者:小祖宗要上天

这曾经是ProGuard的是由project.properties控制,但是这不再是这种情况,和Android的文件尚未更新。该project.properties文件现在明确规定,由Android的工具和变化所产生的,将被删除。我试着注释掉proguard.config线,但是当我编译,重写project.properties,并继续使用ProGuard的。什么是禁止的ProGuard目前的方法是什么?谢谢!

 #此文件是由Android的工具自动生成的。
#不要修改这个文件 - 您所做的更改都将被删除!
#
#这个文件必须在版本控制系统进行检查。
#
#要自定义使用Ant构建系统编辑属性
#ant.properties,并覆盖值,以适应脚本您
#项目结构。
#
#为ProGuard的萎缩,混淆你的code,取消本(可用的属性:sdk.dir,的user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt:proguard-google-api-client.txt

#项目的目标。
目标=机器人-17
android.library.reference.1=../../../../android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib
 

解决方案

试图删除项目ProGuard的目录。所以ProGuard的会忘记它的映射。

It used to be that proguard was controlled by project.properties, but that's no longer the case, and the Android documentation has not been updated. The project.properties file now clearly states that the it is generated by Android Tools and changes will be erased. I've tried commenting out the proguard.config line, but when I compile, it rewrites the project.properties, and continues to use proguard. What is the current method of disabling proguard? Thanks!

# 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

解决方案

Try to delete the proguard directory in your project. So proguard will forget its mapping.