使用proguard在android中进行代码混淆

使用proguard在android中进行代码混淆,android,eclipse,Android,Eclipse,proGuard.config=${sdk.dir}/tools/proGuard/proGuard android.txt:proGuard-project.txt # 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 Sy

proGuard.config=${sdk.dir}/tools/proGuard/proGuard android.txt:proGuard-project.txt

# 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-project.txt

# 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的,当我尝试在发布模式下构建apk时,我在EclipseJuno中得到了错误代码1。如果我在androidstudio中使用相同的代码,我可以构建发布版apk。如果我对从android studio获得的apk进行反向工程,我可以阅读整个代码,因此如何混淆代码要使用proguard,只需使用gradil脚本启用proguard即可

打开gradil文件并启用minifiable true,然后尝试对应用程序进行签名