1、在project.properties文件中,将一行代码的注释去掉
# 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 //前面的#去掉就行
# Project target.
target=android-17
2、若项目有依赖第三方库,jar包的时候,一般的解决方法为在proguard-project.txt添加如下代码:(加在最后面,大括号外面)
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-ignorewarnings
时间: 2024-10-21 10:33:09