美文网首页我爱编程
android 5.0 "main" pri

android 5.0 "main" pri

作者: alian_girl | 来源:发表于2018-06-08 17:39 被阅读80次

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

相关文章

网友评论

    本文标题:android 5.0 "main" pri

    本文链接:https://www.haomeiwen.com/subject/cvwasftx.html