运行应用程序时出现错误,错误如下:
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
Syncing files to device Android SDK built for x86...
D/EGL_emulation(12282): eglMakeCurrent: 0xa4e63920: ver 3 0 (tinfo 0x9b8be970)
E/flutter (12282): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: HttpException: , uri = ....... (link)
E/flutter (12282): #0 ApiProvider.fetchToken (package:cari_mobile_flutter_main/src/resources/network/api_provider.dart:40:40)
E/flutter (12282): <asynchronous suspension>
E/flutter (12282): #1 Repository.fetchToken (package:cari_mobile_flutter_main/src/resources/repositories/repository.dart:10:31)
E/flutter (12282): #2 SplashBloc.fetchToken (package:cari_mobile_flutter_main/src/blocs/splash/splash_bloc.dart:18:38)
E/flutter (12282): <asynchronous suspension>
E/flutter (12282): #3 _SplashScreenState.initState (package:cari_mobile_flutter_main/src/view/splash/splash.dart:29:10)
E/flutter (12282): #4 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3846:58)
E/flutter (12282): #5 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3717:5)
E/flutter (12282): #6 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
E/flutter (12282): #7 Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
E/flutter (12282): #8 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4876:14)
E/flutter (12282): #9 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2961:14)
E/flutter (12282): #10 Element.updateChild (package:flutter/src/widgets/framework.dart:2764:12)
E/flutter (12282): #11 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3750:16)
E/flutter (12282): #12 Element.rebuild (package:flutter/src/widgets/framework.dart:3565:5)
E/flutter (12282): #13 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3722:5)
E/flutter (12282): #14 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3717:5)
出现此错误是因为我想调用API进行访问或获取令牌。但是,我实际上遇到了这样的错误:Unhandled Exception: HttpException: , uri = ....... (link).
以前,我无法提供链接地址,因为它是机密的。 是否有解决此错误/问题的解决方案?我请求您的帮助。
预先感谢!