ProGuard says: "can't find referenced class" for 4.1.0 ABS lib

1,929 views
Skip to first unread message

Saran

unread,
May 24, 2012, 3:23:41 PM5/24/12
to actionba...@googlegroups.com
Hi there,

I've used 4.0.2 lib with proguard just fine in the past and since few days ago I've upgraded the lib to 4.1.0 and now I get the errors:

Proguard returned with error code 1. See console                                                                                                                                                                                                                             
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$id                                                                                                                                                      
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$id                                                                                                                                                      
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$attr                                                                                                                                                    
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$attr                                                                                                                                                    
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$id                                                                                                                                                      
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$id                                                                                                                                                      
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$id                                                                                                                                                      
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$bool                                                                                                                                                    
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$bool                                                                                                                                                    
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$styleable                                                                                                                                               
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$styleable                                                                                                                                               
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$id                                                                                                                                                      
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$id                                                                                                                                                      
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$layout                                                                                                                                                  
Warning: com.actionbarsherlock.internal.ActionBarSherlockCompat: can't find referenced class com.actionbarsherlock.R$layout                                                                                                                                                  

and so on...


I'm using the ABS lib as a Library project in my project. Until I resolve this problem, I can't switch to 4.1.0 ABS...

Oh, yes, my proguard conf is attached.


Yours,
Saran

proguard.cfg

Jonathan Steele

unread,
May 24, 2012, 4:43:29 PM5/24/12
to actionba...@googlegroups.com
Try

-keepclassmembers class **.R$* {
    public static <fields>;
}

in latest android proguard configuration

Robert Saric

unread,
May 25, 2012, 3:53:00 AM5/25/12
to actionba...@googlegroups.com
Good call, Jonathan - that did the trick!

Thank you for the quick and to-the-point answer :)


Yours,
Saran
Reply all
Reply to author
Forward
0 new messages