deano2390 / MaterialShowcaseView

A Material Design themed ShowcaseView for Android
Apache License 2.0
2.72k stars 526 forks source link

Crash when working on API Level 26/Java 8 #130

Open peterhav opened 7 years ago

peterhav commented 7 years ago

After migration to API level 26, the new Android Studio 3.0 version (canary 4) and java 8:

compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

I'm getting the following crash when using this library:

UncaughtException: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/animation/Animator$AnimatorListener$$CC;
                                                                               at uk.co.deanwild.materialshowcaseview.AnimationFactory$1.onAnimationStart(Unknown Source:0)
                                                                               at android.animation.ValueAnimator.notifyStartListeners(ValueAnimator.java:990)
                                                                               at android.animation.ValueAnimator.startAnimation(ValueAnimator.java:1239)
                                                                               at android.animation.ValueAnimator.start(ValueAnimator.java:1041)
                                                                               at android.animation.ValueAnimator.start(ValueAnimator.java:1065)
                                                                               at android.animation.ObjectAnimator.start(ObjectAnimator.java:852)
                                                                               at uk.co.deanwild.materialshowcaseview.AnimationFactory.fadeInView(AnimationFactory.java:44)
                                                                               at uk.co.deanwild.materialshowcaseview.MaterialShowcaseView.fadeIn(MaterialShowcaseView.java:786)
                                                                               at uk.co.deanwild.materialshowcaseview.MaterialShowcaseView$1.run(MaterialShowcaseView.java:755)
                                                                               at android.os.Handler.handleCallback(Handler.java:769)
                                                                               at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                               at android.os.Looper.loop(Looper.java:164)
                                                                               at android.app.ActivityThread.main(ActivityThread.java:6540)
                                                                               at java.lang.reflect.Method.invoke(Native Method)
                                                                               at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                                                                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
                                                                            Caused by: java.lang.ClassNotFoundException: Didn't find class "android.animation.Animator$AnimatorListener$$CC" on path

I suspect (and hope) that this is an issue that is being caused by the fact that this is still a 'canary' version. This issue to keep track of the progress (and to help other facing this problem).

Note that this is also discussed on StackOverflow (other libraries have the same problem): https://stackoverflow.com/questions/44638087/android-library-is-not-working-with-java-8

peterhav commented 7 years ago

Related Google issue: https://issuetracker.google.com/issues/62800181