Java Proguard.cfg 丢失

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4444818/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 17:35:13  来源:igfitidea点击:

Proguard.cfg Missing

javaandroidproguard

提问by Tantalus

I made the mistake of upgrading eclipse today and now can't get my a new Android project to get going.

我今天犯了升级 eclipse 的错误,现在无法启动我的新 Android 项目。

I get the message Proguard.cfg (the file can't be found).

我收到消息 Proguard.cfg(找不到文件)。

Where is this thing I can't seem to find it? Is it possible to get rid of it I don't need Obfuscation in this project...

这个东西在哪里我似乎找不到它?有没有可能摆脱它我在这个项目中不需要混淆......

Thanks

谢谢

采纳答案by Julio Gorgé

If you really don't need Proguard to obfuscate your release builds, you can remove the following line from the default.properties file in your project root folder:

如果您真的不需要 Proguard 来混淆您的发布版本,您可以从项目根文件夹中的 default.properties 文件中删除以下行:

proguard.config=proguard.cfg

proguard.config=proguard.cfg

If you want a proguard.cfg template, you can create a new Android project from scratch with Eclipse's project wizard, then copy proguard.cfg from the new project over to the previous one.

如果您想要一个 proguard.cfg 模板,您可以使用 Eclipse 的项目向导从头开始创建一个新的 Android 项目,然后将 proguard.cfg 从新项目复制到前一个项目。

回答by LesterM

I just experienced the same problem.

我刚刚遇到了同样的问题。

You need to update your SDK tools to current version.

您需要将您的 SDK 工具更新到当前版本。

In Eclipse go into your Android SDK and AVD Manager. Select Installed Packages in the left hand tab. Click Update All. Select the SDK tools latest version. Click Install.

在 Eclipse 中,进入您的 Android SDK 和 AVD 管理器。在左侧选项卡中选择已安装的软件包。单击全部更新。选择 SDK 工具最新版本。单击安装。

After it's done you should have the Proguard.cfg file in your tools/lib/ directory.

完成后,您应该在 tools/lib/ 目录中有 Proguard.cfg 文件。

回答by chavey

cp /android-sdk/tools/proguard/examples/android.pro /android-sdk/tools/lib/proguard.cfg

cp /android-sdk/tools/proguard/examples/android.pro /android-sdk/tools/lib/proguard.cfg

回答by ligi

lately the base proguard config is here in the sdk dir - so you only have to put this into your project.properties:

最近,基本的 proguard 配置位于 sdk 目录中 - 因此您只需将其放入您的 project.properties 中:

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt

if you want to make project-specific modifications, create a proguard-project.txt and change the line to:

如果要进行特定于项目的修改,请创建一个 proguard-project.txt 并将该行更改为:

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt