Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
441 views
in Technique[技术] by (71.8m points)

android - Nativescript webview crash on load after Google maps: How do I software render a webview?

As the title states, I have a webview in my app and it runs fine - unless I load the other page with a Google map on it first.

I did find a partial answer to this which states it's possible to work around by software rendering the webview: https://stackoverflow.com/a/35450929/2145126

I'm seeing the crash on my Pixel_2_API_28 emulator, which means if it is the same bug, it's not limited to the hardware the answer listed. It runs fine on my physical phone (LG Velvet)

I'd like to try the software rendering solution, but can't figure out how to do that in Nativescript.

Edit to clarify: I am using nativescript-google-maps-sdk. The linked answer states that loading 2d canvas objects before a webview on certain phones/sdk levels on Android will cause a crash unless you put the webview into software rendering mode. My question is specifically how do I do that?

question from:https://stackoverflow.com/questions/65911723/nativescript-webview-crash-on-load-after-google-maps-how-do-i-software-render-a

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

use a native component like https://market.nativescript.org/plugins/nativescript-google-maps-sdk/ or https://market.nativescript.org/plugins/@nativescript-community/ui-mapbox/ follow the install instructions of their readme's. if the content of a webview is to heavy, it can cause an app crash


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...