react-native-echarts-pro icon indicating copy to clipboard operation
react-native-echarts-pro copied to clipboard

安卓 0.68 多个图表会导致本页面 崩溃

Open chn711 opened this issue 2 years ago • 5 comments

页面上有多个图表, 如果这个页面有其它点击push页面 点击进其它页面时,整个APP闪退

chn711 avatar Jun 16 '22 09:06 chn711

解决了么?我也遇到这个问题了

lixy01 avatar Jul 01 '22 10:07 lixy01

试试这个方法,通过webViewSettings为内部的webview加上opacity: 0.99这个属性,如下:

<RNEChartsPro
    ......
    webViewSettings={{
        style: {
            height: 400,
            backgroundColor: 'transparent',
            opacity: 0.99,
        }
    }}
/>

或者针对安卓上的闪退,禁用硬件加速试试:

<RNEChartsPro 
    ......
    webViewSettings={{
      androidHardwareAccelerationDisabled: true
  }}
/>

如果第一种方法好使的话,推荐第一种方法。

congshengwu avatar Jul 06 '22 01:07 congshengwu

我也是通过这个解决的,哈哈

------------------ 原始邮件 ------------------ 发件人: "supervons/react-native-echarts-pro" @.>; 发送时间: 2022年7月6日(星期三) 上午9:07 @.>; @.@.>; 主题: Re: [supervons/react-native-echarts-pro] 安卓 0.68 多个图表会导致本页面 崩溃 (Issue #57)

试试这个方法,通过webViewSettings为内部的webview加上opacity: 0.99这个属性,如下: <RNEChartsPro ...... webViewSettings={{ style: { height: 400, backgroundColor: 'transparent', opacity: 0.99, } }} />

或者禁用针对安卓上的闪退,禁用硬件加速试试: <RNEChartsPro ...... webViewSettings={{ androidHardwareAccelerationDisabled: true }} />

如果第一种方法好使的话,推荐第一种方法。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

lixy01 avatar Jul 06 '22 01:07 lixy01

webViewSettings={{ androidLayerType: 'software', }}也可以 ,其实就是禁用硬件加速

jypleo avatar Jul 06 '22 09:07 jypleo

谢谢大佬,我还以为我没法用这东西了都,windows上没问题,刚买回来的mac不停闪退,烦死了。。。。。毕竟这图表这么好用

EternityFOR avatar Aug 05 '22 16:08 EternityFOR

1.8.5之后的版本在多图表渲染性能上有所提升,为确保稳定性,后续将会默认禁用硬件加速以及设置 opacity: 0.99

supervons avatar Sep 05 '22 07:09 supervons