Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in release build due to missing proguard rules #30

Open
albinus-sc opened this issue Sep 6, 2022 · 2 comments
Open

Crash in release build due to missing proguard rules #30

albinus-sc opened this issue Sep 6, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@albinus-sc
Copy link

Describe the bug
Everything works fine when building directly from Android Studio, but as soon as we made a release build, we got a crash:

Fatal Exception: java.lang.IllegalArgumentException: The key must be an application-specific resource id.
at android.view.View.setTag(View.java:26098)
at com.eudycontreras.boneslibrary.extensions.ViewExtensionsKt.clearProps(ViewExtensionsKt.java:153)
at com.eudycontreras.boneslibrary.framework.bones.BoneDrawable$initialize$4.invoke(BoneDrawable.kt:179)
at com.eudycontreras.boneslibrary.framework.bones.BoneDrawable$initialize$4.invoke(BoneDrawable.kt:94)
at com.eudycontreras.boneslibrary.framework.bones.BoneManager.dispose(BoneManager.kt:108)
at com.eudycontreras.boneslibrary.framework.bones.BoneManager$animateFadeOut$3.invoke(BoneManager.kt:166)
at com.eudycontreras.boneslibrary.framework.bones.BoneManager$animateFadeOut$3.invoke(BoneManager.kt:23)
at com.eudycontreras.boneslibrary.extensions.AnimatorExtensionsKt$animate$$inlined$addListener$1.onAnimationEnd(Animator.kt:117)
at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:600)
at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1333)
at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1575)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:307)
at android.animation.AnimationHandler.-$$Nest$mdoAnimationFrame(AnimationHandler.java)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:86)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1229)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
at android.view.Choreographer.doCallbacks(Choreographer.java:899)
at android.view.Choreographer.doFrame(Choreographer.java:827)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

We fixed this by adding the following line to our app's proguard-rules.pro:

-keep class com.eudycontreras.boneslibrary.framework.bones.BoneProperties { *; }

This was hard to debug, so it would be nice if this line was just added the the proguard-rules file in the library instead :)

Smartphone (please complete the following information):

  • Device: Pixel 6
  • SDK Version 33
  • Version v1.4.5
@albinus-sc albinus-sc added the bug Something isn't working label Sep 6, 2022
@mohsenmdb
Copy link

I have same bug

@behemoth-13
Copy link

The same crash if you are using SkeletonDrawable.
Add to fix:

-keep class com.eudycontreras.boneslibrary.framework.skeletons.SkeletonProperties { *; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants