question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crash when i navigate to android from flatlist, i tried androidHardwareAccelerationDisabled but not work, please help

Version detail

   "react-native-webview": "^11.17.1",
   "react-native-pell-rich-editor": "^1.8.8",
   "react-native": "^0.67.1",

The code

 <RichEditor
            androidHardwareAccelerationDisabled
            editorInitializedCallback={() => {
              richText?.current?.setFontName("Montserrat");
            }}
            ref={richText}
            editorStyle={{
              cssText: fontEditor,
              contentCSSText: editorCss,
              // backgroundColor: color.backgroundGrey,
            }}
            onChange={(descriptionText) => {
              console.log("descriptionText:", descriptionText);
            }}
          />

Behavior

https://user-images.githubusercontent.com/37074707/151480856-bae059ae-c50f-432d-843f-2ae2c882d8dc.mov

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

23reactions
davidwicocommented, Feb 25, 2022

Like @KazakovVS suggests, you can pass androidLayerType prop with software value to underlying web view:

<RichEditor
  androidLayerType="software"
  ...
/>

androidHardwareAccelerationDisabled is deprecated according to react-native-webview documentation, so there is no need to use it

11reactions
KazakovVScommented, Feb 24, 2022

Instead of switching off the hardware acceleration globally, just passed 2 additional params to the component:

  • androidLayerType=“software”
  • androidHardwareAccelerationDisabled
Read more comments on GitHub >

github_iconTop Results From Across the Web

Detect and diagnose crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
Fix an Android device that's restarting or crashing
Restart your phone. One by one, remove recently downloaded apps. Learn how to delete apps. After each removal, restart your phone normally. See...
Read more >
Why Do My Apps Keep Crashing on Android? - Avast
1. The “Force stop” method · 2. Restart your Android device · 3. Keep your phone updated · 4. Clear your cached data...
Read more >
Why are my Android phone apps crashing or closing & how to ...
Another reason for Android apps crashing can be a lack of storage space in your device. This can occur when you overload your...
Read more >
How to Stop Apps From Crashing on Android - AVG
Freezing apps can be caused by the apps themselves, due to programming bugs, or by the way they're used — if you try...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found