java.lang.RuntimeException: java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable

JIRA | Julian Dropmann | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Impacted Cases ============== Using animatable XWalkView with Android N. Reproduce Test Steps ==================== XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW, true); new XWalkView(this) Expected Outcome ================ No crash/exception. Actual Outcome ============== java.lang.RuntimeException: java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable at org.xwalk.core.ReflectConstructor.newInstance(ReflectConstructor.java:54) at org.xwalk.core.XWalkView.reflectionInit(XWalkView.java:1882) at org.xwalk.core.XWalkView.<init>(XWalkView.java:340) Caused by: java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable at android.view.TextureView.setBackgroundDrawable(TextureView.java:302) at android.view.View.setBackground(View.java:18120) at android.view.View.setBackgroundColor(View.java:18082) at org.chromium.content.browser.ContentViewRenderView.initTextureView(ContentViewRenderView.java:68) at org.chromium.content.browser.ContentViewRenderView.<init>(ContentViewRenderView.java:145) at org.xwalk.core.internal.XWalkContent$2.<init>(XWalkContent.java:177) at org.xwalk.core.internal.XWalkContent.setNativeContent(XWalkContent.java:177) at org.xwalk.core.internal.XWalkContent.<init>(XWalkContent.java:136) at org.xwalk.core.internal.XWalkViewInternal.initXWalkContent(XWalkViewInternal.java:441) at org.xwalk.core.internal.XWalkViewInternal.<init>(XWalkViewInternal.java:386) at org.xwalk.core.internal.XWalkViewBridge.<init>(XWalkViewBridge.java:80) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at org.xwalk.core.ReflectConstructor.newInstance(ReflectConstructor.java:48) at org.xwalk.core.XWalkView.reflectionInit(XWalkView.java:1882)  at org.xwalk.core.XWalkView.<init>(XWalkView.java:340)  Test Case Source Code ===================== |build.gradle| https://crosswalk-project.org/jira/secure/attachment/15633/build.gradle| |app/build.grade| https://crosswalk-project.org/jira/secure/attachment/15634/build.gradle| |AndroidManifest.xml| https://crosswalk-project.org/jira/secure/attachment/15635/AndroidManifest.xml| |MainActivity.java| https://crosswalk-project.org/jira/secure/attachment/15636/MainActivity.java| |Process Log| https://crosswalk-project.org/jira/secure/attachment/15638/log.txt| |Device About| https://crosswalk-project.org/jira/secure/attachment/15637/device-2016-08-08-162500.png| Test Builds =========== 20.50.533.12 failed 21.51.546.3 failed Issue Analysis ============== android.view.TextireView.setBackgroundColor / setBackground / setBackgroundDrawable seems not to be supported on Android N

    JIRA | 7 months ago | Julian Dropmann
    java.lang.RuntimeException: java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      TextureView doesn't support displaying a background drawable

      at android.view.TextureView.setBackgroundDrawable()
    2. Android Platform
      View.setBackgroundColor
      1. android.view.TextureView.setBackgroundDrawable(TextureView.java:302)
      2. android.view.View.setBackground(View.java:18120)
      3. android.view.View.setBackgroundColor(View.java:18082)
      3 frames
    3. org.chromium.content
      ContentViewRenderView.<init>
      1. org.chromium.content.browser.ContentViewRenderView.initTextureView(ContentViewRenderView.java:68)
      2. org.chromium.content.browser.ContentViewRenderView.<init>(ContentViewRenderView.java:145)
      2 frames
    4. org.xwalk.core
      XWalkViewBridge.<init>
      1. org.xwalk.core.internal.XWalkContent$2.<init>(XWalkContent.java:177)
      2. org.xwalk.core.internal.XWalkContent.setNativeContent(XWalkContent.java:177)
      3. org.xwalk.core.internal.XWalkContent.<init>(XWalkContent.java:136)
      4. org.xwalk.core.internal.XWalkViewInternal.initXWalkContent(XWalkViewInternal.java:441)
      5. org.xwalk.core.internal.XWalkViewInternal.<init>(XWalkViewInternal.java:386)
      6. org.xwalk.core.internal.XWalkViewBridge.<init>(XWalkViewBridge.java:80)
      6 frames
    5. Java RT
      Constructor.newInstance
      1. java.lang.reflect.Constructor.newInstance0(Native Method)
      2. java.lang.reflect.Constructor.newInstance(Constructor.java:430)
      2 frames
    6. org.xwalk.core
      XWalkView.<init>
      1. org.xwalk.core.ReflectConstructor.newInstance(ReflectConstructor.java:48)
      2. org.xwalk.core.XWalkView.reflectionInit(XWalkView.java:1882)
      3. org.xwalk.core.XWalkView.<init>(XWalkView.java:340)
      3 frames