A/art: art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: can't call void android.view.View.setElevation(float) on null object
A/art: art/runtime/check_jni.cc:65] in call to CallVoidMethodV
A/art: art/runtime/check_jni.cc:65] from void android.animation.PropertyValuesHolder.nCallFloatMethod(java.lang.Object, long, float)
A/art: art/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable
...
我在做项目时出现了这种问题,而且不止一次,所以写下来记录一下这个bug。
google时,在github上找到了解决问题的方案,
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stateListAnimator="@null"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
只要在AppBarLayout布局里边加上 android:stateListAnimator="@null" 这行代码就能解决了
原文链接:Crash on Android 5.0! · Issue #195 · lapism/SearchBar-SearchView · GitHub
网友评论