默认的Android proguard.cfg文件没有指定任何-injars
或-outjars
选项,我还没有发现什么-outjars'
输出应该是任何文档。在另一方面,ProGuard的网站提供包括-injars
和-outjars
一个机器人样品。我应该遵循哪一个?您是否需要在ProGuard for Android版本中指定-injars和-outjars选项?
4
A
回答
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,或-libraryjars选项。基于项目的结构,Ant,Eclipse,Grade或Maven插件会在您构建项目时为您添加它们。您的配置文件可以是空的,除了任何项目特定的配置。请参阅Android文档中的ProGuard页面。
ProGuard的网站上的例子是单机版本。
相关问题
- 1. 您是否需要指定使用最新的框架版本?
- 2. 您是否需要从GitHub for Mac中单独安装Git?
- 3. sbt-proguard您必须为缩小步骤指定'-keep'选项
- 4. 您是否需要支付在商业软件中使用db4o for Android?
- 5. 需要Android版本
- 6. 是否需要app_id for dialog.feed
- 7. ProGuard和25.1.6版本Android的工具
- 8. apache2:您的Ruby版本是2.1.6,但您的Gemfile指定为2.3.4
- 9. ProGuard for Android和Retrofit2 Converter Gson?
- 10. 错误:“您需要指定一种方法来创建选项卡指示器”
- 11. 如何在proguard中指定库项目
- 12. 您的Ruby版本是2.2.4,但您的Gemfile指定了2.3.0?
- 13. OSX您的Ruby版本是2.0.0,但您的Gemfile指定2.2.3
- 14. 您需要为PFQueryTableViewController指定一个parseClassName
- 15. 我是否需要sqllite for symfony2在php
- 16. Pip:指定次要版本
- 17. package-lock.json是否需要在git中进行版本控制?
- 18. 是否需要为每个屏幕尺寸指定片段选项卡图标?
- 19. 在Google play中更新android应用需要更改版本和版本号?
- 20. 如果您有LDAP,JCE是否需要?
- 21. 您是否需要发布@property?
- 22. 您是否需要iPhone 3Gs(或更新版本)以及构建设置?
- 23. SimpleDateFormat - 您是否需要使用RegEx?
- 24. 您是否需要RESTful webservice的接口?
- 25. 您是否需要使用Invoke on Action?
- 26. 如果我已经指定Key,是否需要指定Required?
- 27. 您是否需要对JNI使用gradle-experimental?
- 28. 错误配置:您需要在您的Django设置文件中指定NAME
- 29. 是否需要在我的JCL中指定所有文件?
- 30. Python PIP:选项指定的顺序是否重要?
所以你最终指定** injars **和** ** outjars,还是你只是使用Proguard的插件,在IDE? – 2016-11-03 13:32:11