android Proguard“无法创建任务或输入proguard”

时间:2011-05-02 08:19:53

标签: android obfuscation proguard

我正在按照本教程为我的项目制作一个模糊的程序: http://android-developers.blogspot.com/2010/09/proguard-android-and-licensing-server.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogspot%2FhsDu+%28Android+Developers+Blog%29

但是当我想在最后一部分执行“ant release”时,它会像这样变成错误:

-dex-obfuscate:
 [taskdef] Could not load definitions from resource proguard/ant/task.properties. It    could not be found.
 [delete] Deleting: /home/drikvi/workspace/SuitAuto/obf/original.jar
  [jar] Building jar: /home/drikvi/workspace/SuitAuto/obf/original.jar

 BUILD FAILED
 /home/drikvi/workspace/SuitAuto/add-proguard-release.xml:35: Problem: failed   to            create    task or type proguard
 Cause: The name is undefined.
 Action: Check the spelling.
 Action: Check that any custom tasks/types have been declared.
 Action: Check that any <presetdef>/<macrodef> declarations have taken place.

而且,我在哪里可以找到proguard安装目录?

谢谢!

2 个答案:

答案 0 :(得分:1)

Proguard现已集成到Android构建系统中。如果您获得最新的SDK和兼容插件,则不需要单独安装Proguard。我只能假设您所引用的博客是在此之前编写的。如果您阅读Proguard并按照列出的步骤进行操作,那么您应该没有其他问题

答案 1 :(得分:0)

如果您使用单独的Proguard。添加到您的proguard的local.properties路径

proguard.dir=C:\\Eclipse\\proguard4.6\\lib