修复致命bug:release包缺android.permission.INTERNET导致所有网络请求EPERM失败
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<application
|
||||
android:label="玄龙期货"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
|
||||
@@ -69,7 +69,8 @@ class ApiClient {
|
||||
onError: (e, handler) {
|
||||
// 连接/证书类失败保留原始类型,交给 _send 做候选切换
|
||||
if (_isSwitchable(e)) {
|
||||
DebugLogger.instance.log('ERR', '${e.type.name} ${e.requestOptions.uri}');
|
||||
final detail = (e.error ?? e.message ?? '').toString().replaceAll('\n', ' ');
|
||||
DebugLogger.instance.log('ERR', '${e.type.name} ${detail.length > 120 ? detail.substring(0, 120) : detail} ${e.requestOptions.uri}');
|
||||
handler.next(e);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user