-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: DioError [DioErrorType.DEFAULT]: RangeError (index): Invalid value: Only valid value is 0: 1#0 List.[] (dart:core-patch/growable_array.dart:145:60) #303
Comments
+1 |
找到原因了 android模拟器把宿主机ip指定为了10.0.2.2 所以不要访问电脑的ip 要访问10.0.2.2这个ip @Q14 |
楼上正解,只要url无效,就会报这个错。 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions. |
请问下,我用的是真机测试也报这个错,怎么解决呢 |
my base URL in dio was empty "" now solved |
如果该问题还存在,请按模板补全信息,然后给出最小的可复现步骤后再重新打开 |
I got the same error, but in my case, it was because my base URL in dio was missing the |
New Issue Checklist
Issue Info
Issue Description and Steps
Unhandled Exception: DioError [DioErrorType.DEFAULT]: RangeError (index): Invalid value: Only valid value is 0: 1#0 List.[] (dart:core-patch/growable_array.dart:145:60)
#1 RequestOptions.uri (package:dio/src/options.dart:217:29)
#2 DefaultHttpClientAdapter.fetch (package:dio/src/adapter.dart:120:67)
#3 Dio._makeRequest (package:dio/src/dio.dart:735:46)
#4 Dio._request.. (package:dio/src/dio.dart:707:22)
#5 _rootRunUnary (dart:async/zone.dart:1132:38)
#6 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#7 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#8 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#9 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#10 Future._complete (dart:async/future_impl.dart:473:7)
#11 _SyncCompleter.complete (dart:async/<…>
The text was updated successfully, but these errors were encountered: