Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
440 views
in Technique[技术] by (71.8m points)

android - proguard.cfg file missing

Reading the docs on proguard . . . android docs

I'm supposed to have a ProGuard.cfg as it says... "When you create an Android project, a proguard.cfg file is automatically generated in the root directory of the project. "

If I google the issue there are answers all over the place most of them saying to modify a file that starts with a warning not to modify the file.

Are the docs out of date? How to I get this enabled for release builds? thanks, Gary

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you're using ADT 17 or newer, the documentation is slightly inaccurate. The generated file is proguard-project.txt and will be in the root directory of your project.

To enable Proguard, you will need to ignore the "do not modify" warning in project.properties and uncomment the following line:

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

The Android toolchain will sometimes make changes to project.properties, but your Proguard path will be preserved.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...