2014-11-06 76 views
1

我试图建立ProGuardEclipse一个标准的“Hello World”应用。Android Proguard:如何在Eclipse中设置?

我已在取消在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 *; 
#} 
+1

Proguard的运行的详细信息。 – 2014-11-06 11:08:02

+0

感谢您的帮助,如何在发布版本中运行应用程序?任何教程链接都会很棒! – user4125772 2014-11-06 11:36:46

+0

采取这里看看'HTTP:// stackoverflow.com/A/3417157/1602333' – 2014-11-06 11:51:24

回答

1

Proguard的只能在发行工作中产生 - (签名& &无符号)。所以去你的清单,并发挥出口功能

也解决您的评论问题,是的,它会实施,但没有签名..,一旦proguard实施它会显示一个proguard文件夹,这就是你如何知道proguard活跃..

有关proguard的是如何工作的& &等,check this当你在Eclipse中建立你的应用程序发布版本