2012-07-16 44 views

回答

0

我做了一点搜索,我发现了一个文件,$ANDROID_SDK/tools/proguard/examples/android.pro,其中规定:

# 
# This ProGuard configuration file illustrates how to process Android 
# applications. 
# Usage: 
#  java -jar proguard.jar @android.pro 
# 
# If you're using the Android SDK (version 2.3 or higher), the android tool 
# already creates a file like this in your project, called proguard.cfg. 
# It should contain the settings of this file, minus the input and output paths 
# (-injars, -outjars, -libraryjars, -printmapping, and -printseeds). 
# The generated Ant build file automatically sets these paths. 

# Specify the input jars, output jars, and library jars. 
# Note that ProGuard works with Java bytecode (.class), 
# before the dex compiler converts it into Dalvik code (.dex). 

其中,我想,回答我的问题。

+0

所以你最终指定** injars **和** ** outjars,还是你只是使用Proguard的插件,在IDE? – 2016-11-03 13:32:11

0

不,你不应该指定任何-injars,-outjars,或-libraryjars选项。基于项目的结构,Ant,Eclipse,Grade或Maven插件会在您构建项目时为您添加它们。您的配置文件可以是空的,除了任何项目特定的配置。请参阅Android文档中的ProGuard页面。

ProGuard的网站上的例子是单机版本。

相关问题