I imported an older project after a I installed the android SDK on a new computer. I am getting the following error in the "problems" window in eclipse.
Obsolete proguard file; use -keepclasseswithmembers instead of -keepclasseswithmembernames proguard.cfg /MyApplication line 1
Here is the file. I tried replacing the -keepclasseswithmembernames
in this file with -keepclasseswithmembers
but it did not help.
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
It seems to be an Eclipse / Android SDK error i suggest
1) close the project is giving error to you 2) remove it from eclipse ( do not remove folder or source ) 3) import the project you removed 4) clean and build again
Best regards stefano
selected the error in eclipse problems window. and it works for me.
This is what helped me; Right click on project's name, and click on "Android Project". Then select "Clear Lint Markers". Seems that I had accidentally run "Lint" for checking for some common problems after which I began seeing those proguard.cfg errors. Funny thing is that even though I was compiling in debug mode, eclipse would still complain about proguard (which is supposed to be used when compiling in release mode only).
proguard.cfg will be in your project's root. edit it, replacing:
with
worked for me running ADT bundle (v21.0.0-531062 with eclipse 3.7.2 using JDK1.7 under windowsxp).
This is a sample config file that I use with proguard 4.4, JDK 1.6, target android 2.1. Check your proguard version by double clicking on the jar file or with
java -jar android-sdk/tools/proguard/lib/proguard.jar
(use android sdk install path)if Previous answer didnt help
Then just create empty Android project in Eclipse and copy/replace created "proguard.cfg" file to your project.