运行时显示错误无效参数的 Flutter 项目:源不能为空

Hus*_*sna 6 mobile android flutter

我是扑的新手。我在尝试运行时创建了一个简单的 flutter 项目。我收到这个错误Unexpected failure from adb: Invalid argument(s): The source must not be null

Error launching the application on emulator-5554 这是我的简单颤振应用程序代码:

import `package:flutter/material.dart`;
 void main(){
    runApp(
       new Center(
        child: new Text(
          "hello, world",
           textDirection: TextDirection.ltr,
        )
       )
    );
 }
Run Code Online (Sandbox Code Playgroud)

谁能建议我可能是什么问题?我应该如何修复它?

Dha*_*nki 6

这是由于 ADB 造成的问题,意味着您的设备或模拟器未正确连接可能会丢失电缆或其他任何东西,因此请首先验证您的设备是否已完美连接此有关 adb 或设备连接的问题。