简体   繁体   English

运行时出现Flutter项目,显示错误无效参数:源不得为null

[英]Flutter project when run showing Error Invalid argument(s): The source must not be null

I'm new to flutter. 我是新来的。 I created a simple flutter project when I trying to run. 尝试运行时,我创建了一个简单的flutter项目。 I was getting this error Unexpected failure from adb: Invalid argument(s): The source must not be null 我收到此错误Unexpected failure from adb: Invalid argument(s): The source must not be null

Error launching the application on emulator-5554 This is my simple flutter application code: Error launching the application on emulator-5554这是我简单的flutter应用程序代码:

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

Can anyone suggest me what might be the issue? 谁能建议我可能是什么问题? How should I have to fix it? 我该如何解决?

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

When you connect the phone, there is options like USB Tethering, MIDI, PTP, file transfer etc... Choose PTP. 当您连接手机时,有USB共享,MIDI,PTP,文件传输等选项。选择PTP。 If it doesn't work try MIDI. 如果不起作用,请尝试使用MIDI。 It will work. 它会工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flutter来自ADB的意外故障:无效参数:源不得为空在设备上启动应用程序时出错 - Flutter Unexpected failure from adb: Invalid argument(s): The source must not be null Error launching application on device 尝试运行颤振项目时显示此 Gradle 错误 - showing this Gradle error when trying to run flutter project Flutter 中的参数无效 - Invalid argument(s) in Flutter Flutter:如果我想导航到详细信息页面,我会在 flutter 中收到无效参数错误 - Flutter: i get invalid argument(s) Error in flutter if i want to navigate to detail page 无效参数:针对 Android 平台时,必须设置 Android 设置 - Invalid argument(s): Android settings must be set when targeting Android platform 为什么它给我一个错误参数不能是 null? - Why it gives me an error Argument must not be null? 当我尝试运行 flutter 项目时将显示此错误 - This Error will be shown when I'll try to run flutter project Flutter Pub 在尝试运行一些旧项目时出错 - Flutter Pub Get Error when trying to run some old project 在 VS 代码 - Mac OS X 上模拟 Android 时出现“无效参数:找不到 null 的可执行文件” - “Invalid Argument(s): Cannot find executable for null” when emulated Android on VS Code - Mac OS X 项目包含错误但未在Android源代码中显示 - Project Contains Error but not showing in source code Android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM