Flutter project when run showing Error Invalid argument s The source must not be null

0 votes

I'm new to flutter. I created a simple flutter project when I trying to run. I was getting this error 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:

import `package:flutter/material.dart`;
 void main(){
       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?

Mar 17, 2023 in Flutter by sarit
• 1,830 points

1 answer to this question.

0 votes

The error message you provided seems to indicate that there is an issue with the Android Debug Bridge (adb) that is used to launch the application on the emulator.

Here are some possible solutions you can try:

  1. Restart the emulator: Sometimes the emulator can get stuck or become unresponsive, which can cause issues when launching the app. Try restarting the emulator and see if that resolves the issue.

  2. Check the emulator connection: Make sure that the emulator is properly connected to the adb server. You can do this by running the command adb devices in the terminal. If the emulator is not listed, try restarting it or creating a new emulator.

  3. Check your Flutter environment: Make sure that your Flutter environment is set up correctly and that you have installed all the necessary dependencies. You can run the command flutter doctor to check your environment and see if there are any issues.

  4. Try a different emulator: If the issue persists, try launching the app on a different emulator or a physical device to see if the issue is specific to the current emulator.

Regarding the code you provided, it seems to be working fine and should not be causing the issue you are seeing.

To know more, join our Flutter App Development Course today.

answered Mar 20, 2023 by venky

Related Questions In Flutter

0 votes
1 answer

Xcode Cloud not building my Flutter Project

It's difficult to determine the exact cause ...READ MORE

answered Apr 11, 2023 in Flutter by Anitha
0 votes
1 answer
0 votes
1 answer

How to change flutter project name and id?

Yes, it is possible to change the ...READ MORE

answered Mar 20, 2023 in Flutter by pooja
0 votes
1 answer
0 votes
1 answer

What are some advantages of Flutter?

Hi@akhtar, Nowadays Flutter is taking the market. It ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,440 points
0 votes
1 answer

'git rev-parse HEAD' is not recognized as an internal or external command

Hi@akhtar, I also faced the same problem. You ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,440 points
+1 vote
3 answers

Flutter plugin not installed; this adds Flutter specific functionality.

Here Is All Possible Solution Added Flutter ...READ MORE

answered Dec 16, 2020 in Others by Blogging
• 140 points
0 votes
1 answer

Linking 3 Flutter Projects in One Flutter Project

Yes, it is possible to combine multiple ...READ MORE

answered Mar 20, 2023 in Flutter by vinayak
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP