【发布时间】:2015-01-02 19:19:28
【问题描述】:
我正在尝试为Eclipse 中的标准“Hello World”应用程序设置ProGuard。
我已经取消注释project.properties中的行,但是Proguard没有启用。
我的代码有什么问题/我缺少什么?
代码如下所示,注意我已将应用程序命名为 Proguard。
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-20
android.library.reference.1=../appcompat_v7
proguard-project.txt:
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
【问题讨论】:
-
Proguard 将在您在 Eclipse 中构建应用发布版本时运行。
-
感谢您的帮助,如何在发布版本中运行应用程序?任何教程链接都会很棒!
-
看这里
http://stackoverflow.com/a/3417157/1602333 -
是否可以使用“导出未签名的应用程序包”,因为我实际上并不想发布这个应用程序,只是为了测试 proguard
-
即我不想将它添加到 playstore,我只想获取 .apk 文件以测试是否正确实现了 proguard
标签: java android eclipse proguard