我无法找到这次启动崩溃的原因。它发生在运行Android 8的One Plus 5t上,我不知道其他设备
目标api:26(我已经尝试将此设置为23)
最低:15(我也尝试将此设置为23)
链接:无
装置:One Plus 5t
这是堆栈跟踪:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setTranslationZ(float)' on a null object reference
at android.view.View$4.setValue(View.java:24481)
at android.view.View$4.setValue(View.java:24479)
at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setAnimatedValue(PropertyValuesHolder.java:1379)
at android.animation.ObjectAnimator.animateValue(ObjectAnimator.java:990)
at android.animation.ValueAnimator.setCurrentFraction(ValueAnimator.java:654)
at android.animation.ValueAnimator.setCurrentPlayTime(ValueAnimator.java:617)
at android.animation.ValueAnimator.start(ValueAnimator.java:1046)
at android.animation.ValueAnimator.start(ValueAnimator.java:1065)
at android.animation.ObjectAnimator.start(ObjectAnimator.java:852)
at android.animation.ValueAnimator.startWithoutPulsing(ValueAnimator.java:1058)
at android.animation.AnimatorSet.handleAnimationEvents(AnimatorSet.java:1142)
at android.animation.AnimatorSet.doAnimationFrame(AnimatorSet.java:1046)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
at android.animation.AnimationHandler.-wrap2(Unknown Source:0)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:964)
at android.view.Choreographer.doCallbacks(Choreographer.java:778)
at android.view.Choreographer.doFrame(Choreographer.java:710)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6809)
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)
未处理的例外:
Java.Lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setTranslationZ(float)' on a null object reference
答案 0 :(得分:0)
void android.view.View.setTranslationZ(float)
某些nuget软件包使用的代码未在某些特定设备上运行。卸载未使用的软件包,问题就消失了