Android 6.0 Marshmallow : Weird error with fragment animation

前端 未结 4 1015
离开以前
离开以前 2021-02-04 04:08

One of my apps in the app store works perfectly fine with Android 5.0, but since today I have my device upgraded to 6.0 I get strange errors. I narrowed it down to the fragment

相关标签:
4条回答
  • 2021-02-04 04:32

    For me it was a NullPointer exception masked as this because of Proguard obfuscation. Run without Proguard and hopefully you'll see the underlying exception.

    0 讨论(0)
  • 2021-02-04 04:36

    This is bug on Marshmallow when we do scale animation. For now we found a workaround by setting view.setLayerType(View.LAYER_TYPE_SOFTWARE) see documentation

    0 讨论(0)
  • 2021-02-04 04:52

    I got this exception and same problem Failed to dispatch window animation state change.android.os.DeadObjectException.

    apparently this happened because i forgot to mention activity in manifest file. I was able to fix it by adding activity in AndroidManifest.xml file.

    simply added following with activity class name and solved the problem

    example :

     <activity
            android:name="packageName.ClassName"
           android:configChanges="orientation|keyboardHidden|screenSize|screenLayout"
            android:screenOrientation="portrait" 
            android:theme="@style/Theme.ActionBarSize_all_view">
        </activity>
    
    0 讨论(0)
  • 2021-02-04 04:53

    In my case, my app didn't crash but the transition between activities was buggy on >6.0. The reason was that one of the activities had the windowBackground property from its style set to @null. I commented it and it got fixed.

    <style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">    
       <item name="android:windowBackground">@null</item>
    </style>
    
    0 讨论(0)
提交回复
热议问题