在我的 java android 项目中使用 Geckoview 时,加载后页面的布局全部损坏。加载页面后已经使用默认的 webview (chrome) 布局是正确的,与在我的桌面浏览器上运行的行为相同。
我在 geckoview 上做错了什么?
我的活动:
protected void onCreate(Bundle savedInstanceState) {
geckoView = findViewById(R.id.myWebViewGc);
geckoSession = new GeckoSession();
GeckoRuntimeSettings.Builder builder = new GeckoRuntimeSettings.Builder()
.javaScriptEnabled(true)
.consoleOutput(true);
geckoRuntime = GeckoRuntime.getDefault(this);
geckoView.setSession(geckoSession, geckoRuntime);
}
AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET"/>
<application
...
# using this to run the app properly, without it the app crashes
android:extractNativeLibs="true"