2014-11-06 77 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中建立你的應用程序發佈版本