Hello,
If Proguard is enabled, I have this error when I generate an APK :
[ERROR] [system.err] Warning: com.theartofdev.edmodo.cropper.CropImageActivity: can't find referenced field 'int cropImageView' in program class com.theartofdev.edmodo.cropper.R$id
...
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
Can you tell me what is the problem?
Thank you
Did you figure this out?
Sadly no, I have disabled proguard for now but this is annoying :/
I am a only proguard amateur, but you could try:
-dontwarn com.theartofdev.edmodo.cropper.R$id
If you don't use the missing resources, or something like:
-keepclassmembers class com.theartofdev.edmodo.cropper.R$id {
public static <fields>;
}
Not sure if the latter works.
Thank you @jmgirven. The -dontwarn rule looks to work. I don't really like to hide warning like this but the app runs fine :)
I don't have experience working with pro-guard so if someone knows what I need to add please let me know.
I've just encountered this. Fixed this by adding -keep class com.theartofdev.edmodo.cropper.* to your proguard-rules.pro file:
Most helpful comment
I've just encountered this. Fixed this by adding
-keep class com.theartofdev.edmodo.cropper.*to your proguard-rules.pro file: