Error generating apk with Proguard

0

I am developing a geolocation app. I need to obfuscate the code of my application, when I activate proguard and I generate the apk it shows me the following:

Warning: com.caverock.androidsvg.SVGImageView: can not find referenced class com.caverock.androidsvg.R $ styleable Warning: com.caverock.androidsvg.SVGImageView: can not find referenced class com.caverock.androidsvg.R $ styleable Warning: com.caverock.androidsvg.SVGImageView: can not find referenced class com.caverock.androidsvg.R Warning: org.mapsforge.map.rendertheme.rule.RenderThemeHandler: can not find referenced class org.kxml2.io.KXmlParser Warning: org.mapsforge.map.rendertheme.rule.RenderThemeHandler: can not find referenced class org.kxml2.io.KXmlParser.

I have found all kinds of solutions on the internet and I still can not solve this problem. If someone could help me.

Thanks in advance.

    
asked by AHG 14.11.2018 в 19:48
source

1 answer

0

It is telling you that the com.caverock.androidsvg.SVGImageView class is referencing com.caverock.androidsvg.R. and it probably does not exist.

You just have to add these lines to your proguard-rules:

-dontwarn com.caverock.androidsvg.SVGImageView
-keep class com.caverock.androidsvg.SVGImageView

And the same if there is some other similar error.

    
answered by 15.11.2018 в 17:16