sephiroth74/HorizontalVariableListView

Problems with Proguard

davanzo opened this issue · 3 comments

Hello,

In my Project I use this HorizontalVariableListView (thanks a lot!)
Using the HorizontalVariableListView with Proguard (in order to release my app) I have problems.
Could you give me some tips what to do?
Here is the proguard log.

Proguard returned with error code 1. See console
Warning: it.sephiroth.android.library.util.v16.ViewHelper16: can't find referenced method 'void postOnAnimation(java.lang.Runnable)' in class android.view.View
Warning: it.sephiroth.android.library.widget.AbsHListView: can't find referenced method 'boolean performAccessibilityAction(int,android.os.Bundle)' in class it.sephiroth.android.library.widget.AdapterView
Warning: it.sephiroth.android.library.widget.AbsHListView: can't find referenced method 'int getImportantForAccessibility()' in class android.view.View
Warning: it.sephiroth.android.library.widget.AbsHListView: can't find referenced method 'void setImportantForAccessibility(int)' in class android.view.View
Warning: it.sephiroth.android.library.widget.AbsHListView$RecycleBin: can't find referenced method 'boolean hasTransientState()' in class android.view.View
Warning: it.sephiroth.android.library.widget.AdapterView: can't find referenced method 'int getImportantForAccessibility()' in class it.sephiroth.android.library.widget.AdapterView
Warning: it.sephiroth.android.library.widget.AdapterView: can't find referenced method 'void setImportantForAccessibility(int)' in class it.sephiroth.android.library.widget.AdapterView
Warning: it.sephiroth.android.library.widget.AdapterView: can't find referenced method 'int getImportantForAccessibility()' in class android.view.View
Warning: it.sephiroth.android.library.widget.AdapterView: can't find referenced method 'void setImportantForAccessibility(int)' in class android.view.View
You should check if you need to specify additional program jars.
Warning: there were 9 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile them and try again.
Alternatively, you may have to specify the option
'-dontskipnonpubliclibraryclassmembers'.
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:321)
at proguard.ProGuard.initialize(ProGuard.java:211)
at proguard.ProGuard.execute(ProGuard.java:86)
at proguard.ProGuard.main(ProGuard.java:492)

Any suggestion?

Thanks in advance.
John

-keep class it.sephiroth.* {;}
Will do the trick, but I've discovered another problem. All the xml configurations that use "xmlns:app" will be ignored I guess, because I'm using " app:dividerWidth="5dp" and it's being ignored.
I need to do it programmatically.

Which can be fixed using:
-keep class *.R -keep class *.R$* {;}

Thanks GuilhE! You gave me the right suggestion!
It seams that proguard has problems with "xmls:app", where app is an external android project.
That is layouts that use external android projects have to be written programmatically and not in xml.
This does then the trick:
-dontwarn it.sephiroth.**