Android ProGuard warning -- can't find referenced class com.zhihu.matisse.R$plurals
For release version of APK, it is highly recommended to set minifyEnabled
be true, this is not only to minimise the final size of your apk, but also help obfuscate your sensitive packages/classes into some messy form of code so that it won't be reverse engineered easily.
According to your error messages below:
com.zhihu.matisse.internal.model.SelectedItemCollection: can't find
referenced class com.zhihu.matisse.R$plurals
Means you miss the R
package references which usually is the resource class from the android aar library, i.e. the zhihu
, check if you are including this lib properly.
Workaround for this problem is as below to find your own strings.xml and put below declaration to cheat proguard.
<plurals name="error_over_count">
<item quantity="one">You can only select one media file</item>
<item quantity="many">You can only select up to %1$d media files</item>
</plurals>
ss.com.bannerslider.adapters.SliderRecylcerViewAdapter: can't find
referenced method 'void
onBindImageSlideView(int,ss.com.bannerslider.viewholder.ImageSlideViewHolder)'
in program class ss.com.bannerslider.adapters.SliderAdapter
ss.com.bannerslider.adapters.SliderRecylcerViewAdapter: can't find
referenced field 'ss.com.bannerslider.SlideType CUSTOM' in program
class ss.com.bannerslider.SlideType
ss.com.bannerslider.adapters.SliderRecylcerViewAdapter$2: can't find
referenced field 'ss.com.bannerslider.SlideType CUSTOM' in program
class ss.com.bannerslider.SlideType there were 2 unresolved
references to classes or interfaces. there were 3 unresolved
references to program class members. Exception while processing
task java.io.IOException: Please correct the above warnings first.
Means you miss the onBindImageSlideView
package references which usually is from other libraries, check if you are including that lib properly.
proguard hell - can't find referenced class
This error occurs because the libs you use depend on other libs which are not realy used, but Proguard is looking for them.
Add your -dontwarn lines to your proguard-rules.pro file in your Android project to disable this warnings.
You can find which dependencies you need to add to your proguard-rules.pro in the stacktrace of your error.
Proguard returned with error code 1. (com.google.android.gms)
Try to prevent play services to obfuscate form proguard.
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**
Android Proguard Can't find referenced
There are two problematic libraries:
RoundCornerProgressBar
MPAndroidChart
The first problem is with the class com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar
. There is a solution here that overcomes the problem, by adding to Proguard:
-dontwarn com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar
The second one is simply solved by adding two statements to Proguard that the author of the library clearly describes here:
-keep class com.github.mikephil.charting.** { *; }
-dontwarn io.realm.**
Your Proguard file should contain those lines and the problems should disappear.
Related Topics
How to Measure Height, Width and Distance of Object Using Camera
Actionbar Logo Centered and Action Items on Sides
How to Change Textcolor in Alertdialog
How to Apply Zoom, Drag and Rotation to an Image in Android
How to Change the Color of a Switchcompat from Appcompat Library
How to Show an Empty View with a Recyclerview
Android Persistence Room: "Cannot Figure Out How to Read This Field from a Cursor"
How to Programmatically Set the Background Color Gradient on a Custom Title Bar
Detect When Recyclerview Reaches the Bottom Most Position While Scrolling
Error :: Duplicate Files During Packaging of APK
Error Message:This Android Sdk Requires Android Developer Toolkit Version 22.6.1 or Above
Android Get Screenshot of All Listview Items
Accessing Contents of R.String Using a Variable to Represent the Resource Name