問(wèn)題
版本庫(kù)從support遷移至androidx后,如果是androidx.appcompat:appcompat:1.1.0
版本,WebView在5.0&5.1設(shè)備上會(huì)引起App崩潰
解決方式
強(qiáng)制使用androidx.appcompat:appcompat:1.0.0
或者androidx.appcompat:appcompat:1.2.0-alpha02
及以上版本
備注
stackoverflo的帖子
官方在1.2.0-alpha02
修復(fù)了這個(gè)問(wèn)題,
打開(kāi)官網(wǎng)語(yǔ)言選擇中文-簡(jiǎn)體,appcompat的版本記錄如下
打開(kāi)官網(wǎng)語(yǔ)言選擇english,appcompat的版本記錄如下
英文文檔比中文多三個(gè)版本,已經(jīng)不止一次是這樣了,中文的總是比英文內(nèi)容少一些,或者更新信息滯后,而這個(gè)問(wèn)題恰好是在1.2.0-alpha02
修復(fù)的,語(yǔ)言選擇中文你是啥也看不到找不到,唉……
Version 1.2.0-alpha02
January 29, 2020
androidx.appcompat:appcompat:1.2.0-alpha02
and androidx.appcompat:appcompat-resources:1.2.0-alpha02
are released. Version 1.2.0-alpha02 contains these commits.
Bug fixes
- Fixed issue where appcompat 1.1.0 crashes webview when long pressed (b/141351441)
- Fixed drawable tinting on TextView relative to compound drawables on API Level 23 (aosp/1172194)
- Ensured the base context is always a wrapper (aosp/1194355)
- Added some improvements to be more clever when modifying the base context configuration (aosp/1204543)
- Disabled
createConfigurationContext()
for Robolectric (aosp/1186218)
去b/141351441看看,一大堆英文,我直接用Chrome翻譯了一下,截圖一部分
至此,我依然是知其然不知其所以然,期待源碼閱讀大神來(lái)評(píng)論區(qū)留下分析。