This commit is contained in:
kunfei
2023-02-16 10:03:14 +08:00
parent f703435f49
commit 92204567c6
2 changed files with 2 additions and 3 deletions
@@ -39,7 +39,7 @@ val cronetEngine: ExperimentalCronetEngine? by lazy {
val engine = builder.build() val engine = builder.build()
DebugLog.d("Cronet Version:", engine.versionString) DebugLog.d("Cronet Version:", engine.versionString)
return@lazy engine return@lazy engine
} catch (e: UnsatisfiedLinkError) { } catch (e: Throwable) {
AppLog.put("初始化cronetEngine出错", e) AppLog.put("初始化cronetEngine出错", e)
return@lazy null return@lazy null
} }
@@ -71,8 +71,7 @@ val okHttpClient: OkHttpClient by lazy {
if (!AppConst.isPlayChannel && AppConfig.isCronet) { if (!AppConst.isPlayChannel && AppConfig.isCronet) {
if (Cronet.loader?.install() == true) { if (Cronet.loader?.install() == true) {
Cronet.interceptor?.let { Cronet.interceptor?.let {
//崩溃 builder.addInterceptor(it)
//builder.addInterceptor(it)
} }
} }
} }