0
私のアプリケーション用にwebviewでローカルHTMLをレンダリングしましたが、iOSとAndroidの両方でうまくいっていました。 svgタグが埋め込まれたhtmlです。反応しません - webviewは、リリースapkをビルドするときにローカルhtmlをレンダリングしません
しかし、私がAndroidでapkを生成し、実行しようとするとすぐに私の携帯電話には、それはレンダリングされません。
.ipaファイルが
const VECTOR_BODY_HTML = require('../custom_views/vector-body.html');
...
<WebView
ref={component => this.mWebView = component}
automaticallyAdjustContentInsets = {false}
contentInset={{top:0 , left:0 ,bottom:-20, right:0}}
source = {VECTOR_BODY_HTML}
scalesPageToFit = {false}
onLoad = {() => {
this.updateBodyViewBox(bodyWidth, bodyHeight);
this.initColorMap();
this.populateBodyMap(15)
}
}
onMessage = {(data) => {this.onMessage(data);}}
style = {{height:bodyHeight}}
>
</WebView>