每次我运行调试会话(可能是在chrome或edge上),页面看起来完全空白,但没有抛出错误。
到目前为止,我已经试过了:
- 将代码减少到最小以排除小部件代码中的错误
- 在不同设备上运行
- 通过flutter运行-d chrome——web-port=8080——web-hostname= IPv4地址的值
- 将localhost添加到我的"安全列表";在我的杀毒软件
在这里你可以看到我的颤振医生-v:
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1237], locale de-DE)
• Flutter version 2.2.3 at C:srcflutter
• Framework revision f4abaa0735 (3 months ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:UsersmarcuAppDataLocalAndroidsdk
• Platform android-31, build-tools 31.0.0
• Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:Program Files (x86)GoogleChromeApplicationchrome.exe
[√] Android Studio
• Android Studio at C:Program FilesAndroidAndroid Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = C:Program FilesAndroidAndroid Studio
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] IntelliJ IDEA Ultimate Edition (version 2019.1)
• IntelliJ at C:Program FilesJetBrainsIntelliJ IDEA 2019.1.2
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code (version 1.60.2)
• VS Code at C:UsersmarcuAppDataLocalProgramsMicrosoft VS Code
• Flutter extension version 3.27.0
[√] Connected device (2 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.61
• Edge (web) • edge • web-javascript • Microsoft Edge 94.0.992.38
• No issues found!
还有我的代码在textform:
import 'package:flutter/material.dart';
void main() {
runApp(TestingWidget());
}
class TestingWidget extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
print("Performing test on testwidget.dart");
return MaterialApp(
home: Scaffold(body: Text("Testwidget") //MethodWidget(),
)
//home: Text("test")
);
}
}
如果我提供了错误的方式,我很抱歉,这是我第一次在stackoverflow上写作。
谢谢你的帮助!
我刚刚遇到了这个问题,结果是网络连接很差,在构建应用程序的过程中耗尽了订阅。恢复了我的互联网,它建立成功了