6

我想在 android studio 中运行 OsmAnd ,但出现以下错误:

:OsmAnd:generateFreeresLegacyX86DebugSources
:OsmAnd:incrementalFreeresLegacyX86DebugJavaCorpilationSafegyard
:OsmAnd: javaPreCompileFreeresLegacyX86Debug 
:OsmAnd:corpileFreeresLegacyX86DebugJavaWithJavac
F:\Users\kamali\not importet 6: error: package android.support import android.support.v4.animation.AnimatorComapatHelpe 
F:\Users\kamali\not importet Drolect\Osmand\Osmand\Osuthnd\src\net\osmand\nlus\audionotes\AudiovideoNoteRecordinaMenuFullScreen. lava: 7: error: package android. support import android.support.v4.animation.AnimatorUpdateListenerCompat; 
F:\Users\kamali\not importet Drolect\Osmand\Osmand\Osuthnd\src\net\osmand\Dlus\audionotes\AudiovideoNoteRecordinaMenuFullScreen. lava: 8: error: package android. support import android.support.v4.animation.ValueAnimatorCowat; 
F:\Users\kamali\not importet proiect\Osmand\Osmand\OsmAnd\src\net\osmand\plus\audionotes\AudioVideoNoteRecordinaMenuFullScreen.iava:28: error: cannot find symbol protected ValueAnimatorCompat animatorCompat; 
symbol: class ValueAnimatorCompat location: class AudioVideoNoteRecordingMenuFullScreen F:\Users\kamali\not importet prolectOsmand\Osmand\OsircAnd\src\net\osmand\plus\audionotes\AudioVideoNoteRecordincjMenuFu1lScreen. lava: 136: error: cannot find symbol animatorCompat = AnimatorCompatHelper.emptyValueAnimator(); 
symbol: variable AnimatorCompatHelper location: class AudioVideoNoteRecordingMenuFullScreen F:\Users\kamali\not importet proiect\Osmand\Osmand\OsmAnd\sranet\osmand\plus\audionotes\AudioVideoNoteRecordinaMenuFullScreen.iava:140: error: cannot find symbol animatorCompat.addUpdateListener(new AnimatorUpdateListenerCompat() 
symbol: class AnimatorUpdateListenerCompat location: class AudioVideoNoteRecordingMenuFullScreen Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 

在此处输入图像描述

请帮我 。

4

1 回答 1

2

我从这个回购 https://github.com/jordyamc/android-advancedrecyclerview/BaseItemAnimationManager 解决了我的问题

import android.view.animation.Interpolator;

protected void resetAnimation(RecyclerView.ViewHolder holder) {
        clearInterpolator(holder.itemView);
        endAnimation(holder);
    }

protected void clearInterpolator(View v) {
        ViewCompat.setAlpha(v, 1.0F);
        ViewCompat.setScaleY(v, 1.0F);
        ViewCompat.setScaleX(v, 1.0F);
        ViewCompat.setTranslationY(v, 0.0F);
        ViewCompat.setTranslationX(v, 0.0F);
        ViewCompat.setRotation(v, 0.0F);
        ViewCompat.setRotationY(v, 0.0F);
        ViewCompat.setRotationX(v, 0.0F);
        //v.setPivotY((float)(v.getMeasuredHeight() / 2));
        ViewCompat.setPivotX(v, (float) (v.getMeasuredWidth() / 2));
        ViewCompat.animate(v).setInterpolator((Interpolator) null);
    }
于 2017-10-08T13:40:56.530 回答