'Issue with ObjectAnimator in release APK
I have done some sort of animation in my app with object animator and its working fine in debug variant. But in production, I have enabled proguard for that and it's not working as expected. I searched a lot for keeping this file in proguard, but no luck. Please help me in this.
I tried the followings
-keep class ma.smartshift.loadtaker.loginv2.** { *; }
-keepclassmembers public class android.animation.ObjectAnimator {
void set*(***);
*** get*();
}
Solution 1:[1]
I know this is a rather old question, but as I stumbled upon it, I thought others might, too.
So Using Proguard is the right approach, but you exclude the wrong class.
You need to exclude the function in the target class of your ObjectAnimator, not the ObjectAnimator itself.
Example
Let's say you have an Object animator animating the peek height of a BottomSheetBehavior:
ObjectAnimator.ofInt(
bottomSheetBehavior,
"peekHeight",
resources.getDimension(R.dimen.miniplayer_peek_height).toInt(),
resources.getDimension(R.dimen.miniplayer_peek_height_anim_max).toInt()
)
Then you would need to add the following to your proguard rules:
-keep class com.google.android.material.bottomsheet.BottomSheetBehavior {
setPeekHeight(int);
}
Solution 2:[2]
In XCode 13.1 there are no settings for that. Unfortunately :(
If everyone add the feedback about this feature, maybe we can improve xcode! https://feedbackassistant.apple.com/
Also i've made a radar https://openradar.appspot.com/radar?id=4948759620354048. Leave your comments there to show the activity.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ubuntudroid |
| Solution 2 |
