AAChartCore-Kotlin
AAChartCore-Kotlin copied to clipboard
Android webview 有问题
1 android.view.InflateException:Binary XML file line #300: Binary XML file line #300: Error inflating class com.aachartmodel.aainfographics.AAInfographicsLib.AAChartCreator.AAChartView
2 ......
3 Caused by:
4 java.lang.RuntimeException:Using WebView from more than one process at once with the same data directory is not supported. https://crbug.com/558377
5 org.chromium.android_webview.AwBrowserProcess.b(PG:3183)
6 my.b(PG:147)
7 my.b(PG:260)
8 my.a(PG:240)
9 com.android.webview.chromium.WebViewChromiumFactoryProvider.a(PG:539)
10 com.android.webview.chromium.WebViewChromium.init(PG:180)
11 android.webkit.WebView.
老哥解决了吗?
//Android P 以及之后版本不支持同时从多个进程使用具有相同数据目录的WebView if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { var processName = getProcessName(this) if ("com.platform.education" != processName) {//判断不等于默认进程名称 WebView.setDataDirectorySuffix(processName) } } 在application加这段就行了