修复致命bug:release包缺android.permission.INTERNET导致所有网络请求EPERM失败

This commit is contained in:
2026-11-08 15:39:30 +08:00
parent cbb261de9d
commit 5781264f13
2 changed files with 4 additions and 1 deletions
@@ -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"
+2 -1
View File
@@ -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;
}