android.support.v4.animation missing in API 26
Asked Answered
J

2

7

I am facing an issue: android.support.v4.animation.* is missing and I cannot find any solution.

Android Plugin upgrade to 3.0 requires buildToolsVersion and compileSDKVersion to 26+ and this package is missing.

Jauch answered 17/11, 2017 at 12:28 Comment(4)
How are you adding the above library?Bendicta
implementation 'com.android.support:support-compat:26.1.0' @PeterHaddadJauch
please check my answer here it maybe the same issue #47356343Bendicta
Have already added the google() repository.Jauch
L
6

You won't find android.support.v4.animation.* in 26+ seemingly because min SDK version has been increased to 14 from 26.0.0 Alpha 1 as described here:

Note: The minimum SDK version has been increased to 14. As a result, many APIs that existed only for API < 14 compatibility have been deprecated. Clients of these APIs should migrate to their framework equivalents as noted in the reference page for each deprecated API.

Many new classes, methods, and constants added to provide backwards-compatible support for platform APIs added in O Preview as specified here.

Hope you're using 26+ support lib version for com.android.support:appcompat-v7. Notice diff in ItemTouchHelper from below 26 and 26+. One includes android.support.v4.animation.* other doesn't and uses classes from android.animation package:

enter image description here

Lodovico answered 20/11, 2017 at 6:15 Comment(2)
Thanks man, but what is the solution . I am trying to use ItemTouchHelper which uses android.support.v4.animation.*. @LodovicoJauch
Use the platform package android.view.animation.*Sandal
K
-1

supportLib 26.0.0+以上AnimatorCompatHelper class be remove

so clearInterpolator(view) not found

we can to use:

TimeInterpolator mDefaultInterpolator = new ValueAnimator().getInterpolator(); view.animate().setInterpolator(mDefaultInterpolator);

Kinship answered 17/8, 2018 at 7:20 Comment(1)
Your answer seems to be right, however please try to write english sentences which everybody can understand. It's very hard right now. Also your answer lacks some "prove" (e.g. a link to the changelog). Please edit your question and add those.Boustrophedon

© 2022 - 2024 — McMap. All rights reserved.