Proguard.cfg error won't go away on newest updates.

2446 views
Skip to first unread message

Nathan

unread,
Dec 19, 2011, 12:54:42 PM12/19/11
to Android Developers
With the latest tools I get this for an Android Library Project:

Obsolete proguard file; use -keepclasseswithmembers instead of -
keepclasseswithmembernames proguard.cfg

(I really hope there was more than a cosmetic reason to change this. )

A reasonable person thinks this will go away after I change the -
keepclasseswithmembernames to -keepclasseswithmembers.

I've done that. I still get the error every time.

I've cleaned the projects. I've refreshed. I've restarted Eclipse.

The error still comes up.

I click on the proguard.cfg file, which has a red x on it. It comes up
in an editor. It does not have the keepclasseswithmembernames.

How do I get the changes to "take"? This is getting ridiculous.

Nathan

Kostya Vasilyev

unread,
Dec 19, 2011, 12:57:54 PM12/19/11
to android-d...@googlegroups.com
Have you tried selecting the error marker in the Problems view and
pressing Delete?

19 декабря 2011 г. 21:54 пользователь Nathan
<critt...@crittermap.com> написал:

> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@googlegroups.com
> To unsubscribe from this group, send email to
> android-develop...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

Nathan

unread,
Dec 19, 2011, 1:04:32 PM12/19/11
to Android Developers
On Dec 19, 9:57 am, Kostya Vasilyev <kmans...@gmail.com> wrote:
> Have you tried selecting the error marker in the Problems view and
> pressing Delete?
>

I have now and it helped. I didn't know I was supposed to do that.

So doing a clean build or restart won't take this away but delete
will?

Nathan

Tor Norbye

unread,
Dec 19, 2011, 1:08:04 PM12/19/11
to android-d...@googlegroups.com
On Mon, Dec 19, 2011 at 9:54 AM, Nathan <critt...@crittermap.com> wrote:
With the latest tools I get this for an Android Library Project:

Obsolete proguard file; use -keepclasseswithmembers instead of -
keepclasseswithmembernames      proguard.cfg

(I really hope there was more than a cosmetic reason to change this. )

No, it wasn't cosmetic - there was an error in the default proguard file we used to ship with, which meant that Proguard could strip too much. 

A reasonable person thinks this will go away after I change the -
keepclasseswithmembernames to -keepclasseswithmembers.

I've done that. I still get the error every time.

Every time you what -- export APK? Or run lint manually?

If the issue is that this is aborting your Export APK operation, then you can turn off the automatic error check as part of APK -- there should have been an error dialog popping up telling you exactly how to do that. In any case, go to the Options dialog, under Android find the Lint category and uncheck the checkboxes at the top of that panel.

You can also locate the Proguard error below and either change its severity from Error to Warning or even Ignore.

Both of these should make the complaint go away.

However, I'm still curious as to why the error is triggering for you if you've really fixed the problem.

Since you're talking about projects (plural), is it possible that there's still one of the projects that contain the old bad pattern? It's possible that lint is associating the wrong path/project with the error so check all of them. Also, if you're using library projects, the ADT 16 version of lint isn't really library project aware so it's only checking the main project.

I've cleaned the projects. I've refreshed. I've restarted Eclipse.

The error still comes up.

I click on the proguard.cfg file, which has a red x on it. It comes up
in an editor. It does not have the keepclasseswithmembernames.

How do I get the changes to "take"? This is getting ridiculous.

Hopefully the above instructions will help make the error go away to unblock you, but I'd be really interested in instructions for how to reproduce this problem, e.g. if your sources are available publicly anywhere (code.google.com or github etc) I can take a look - or even attach something to a new bug at b.android.com .

-- Tor

Tor Norbye

unread,
Dec 19, 2011, 1:16:39 PM12/19/11
to android-d...@googlegroups.com
Oh, I see - I presume Lint got run automatically when you exported an APK, and you then corrected the problem, but since you didn't realize you had run lint (because it's done automatically now) it wasn't clear that you needed to re-run it to update the markers. We can probably do better here (and we do for XML files).   In ADT 17 we automatically open the Lint window when lint is run (where there are Refresh buttons, Ignore buttons etc) so it should be more obvious what to do.

But there's definitely a usability issue here. I've filed issue http://code.google.com/p/android/issues/detail?id=23196 to track this.

-- Tor


Nathan

arnaldomac_gmail

unread,
Dec 20, 2011, 12:07:13 AM12/20/11
to android-d...@googlegroups.com
My  android robot

Kristopher Micinski

unread,
Dec 20, 2011, 12:51:49 AM12/20/11
to android-d...@googlegroups.com
Arnaldo,

Very cool, thanks for sharing!

kris

Michael Banzon

unread,
Dec 20, 2011, 6:22:04 AM12/20/11
to android-d...@googlegroups.com
+1

Thanks for sharing - it looks like a very cool project!!

I'm trying to get more time to experiment with NXT 2.0 + Android ;-)

--
Michael Banzon
http://michaelbanzon.com/

Darren McEntee

unread,
Mar 22, 2012, 4:32:55 PM3/22/12
to android-d...@googlegroups.com
Ah thanks for this i had the same issue with the proguard.cfg after the latest tools update...
Sorted now, cheers. :)


On Monday, 19 December 2011 17:57:54 UTC, Kostya Vasilyev wrote:
Have you tried selecting the error marker in the Problems view and
pressing Delete?

19 декабря 2011 г. 21:54 пользователь Nathan
<critt...@crittermap.com> написал:
> With the latest tools I get this for an Android Library Project:
>
> Obsolete proguard file; use -keepclasseswithmembers instead of -
> keepclasseswithmembernames      proguard.cfg
>
> (I really hope there was more than a cosmetic reason to change this. )
>
> A reasonable person thinks this will go away after I change the -
> keepclasseswithmembernames to -keepclasseswithmembers.
>
> I've done that. I still get the error every time.
>
> I've cleaned the projects. I've refreshed. I've restarted Eclipse.
>
> The error still comes up.
>
> I click on the proguard.cfg file, which has a red x on it. It comes up
> in an editor. It does not have the keepclasseswithmembernames.
>
> How do I get the changes to "take"? This is getting ridiculous.
>
> Nathan
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.

> To post to this group, send email to android-developers@​googlegroups.com


> To unsubscribe from this group, send email to

Reply all
Reply to author
Forward
0 new messages