-4

(Sorry for my poor English) The first picture is from a video, the second one is mine. In the first picture you can see that the result of the her coding is "hello world" But nothing happened to mine. What's wrong with my coding? Picture one

Picture two

Flutter doctor: C:\src\flutter\flutter\bin\flutter.bat doctor --verbose [√] Flutter (Channel stable, v1.17.2, on Microsoft Windows [Version 10.0.18362.900], locale zh-TW) • Flutter version 1.17.2 at C:\src\flutter\flutter • Framework revision 5f21edf8b6 (4 weeks ago), 2020-05-28 12:44:12 -0700 • Engine revision b851c71829 • Dart version 2.8.3

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at C:\Users\MSINB\AppData\Local\Android\sdk • Platform android-29, build-tools 29.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[√] Android Studio (version 4.0) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 46.0.2 • Dart plugin version 193.7361 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (1 available) • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 9 (API 28) (emulator)

! Doctor found issues in 1 category. Process finished with exit code 0

  • Something is wron with your `flutter` setup, what happens when you run `flutter doctor`? – JideGuru Jun 24 '20 at 15:32
  • Can you add the output of flutter doctor? – Amit Kabra Jun 24 '20 at 15:33
  • ! Doctor found issues in 1 category. Process finished with exit code 0 – Joshua Chang Jun 24 '20 at 15:38
  • @JoshuaChang run: `flutter doctor --android-licenses` . Also check your env variables. According to the error `C:\ is not a ...` appears like error in the path of Flutter sdk in env variables. – dev-aentgs Jun 24 '20 at 15:44
  • Microsoft Windows [版本 10.0.18362.900] (c) 2019 Microsoft Corporation. 著作權所有,並保留一切權利。 C:\Users\MSINB>flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, v1.17.2, on Microsoft Windows [Version 10.0.18362.900], locale zh-TW) [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [√] Android Studio (version 4.0) [!] Connected device ! No devices available ! Doctor found issues in 2 categories. – Joshua Chang Jun 25 '20 at 15:32
  • C:\Users\MSINB>flutter doctor --android-licenses Warning: File C:\Users\MSINB\.android\repositories.cfg could not be loaded. 6 of 7 SDK package licenses not accepted. 100% Computing updates... Review licenses that have not been accepted (y/N)? 要終止批次工作嗎 (Y/N)? ^C – Joshua Chang Jun 25 '20 at 15:33

2 Answers2

0

There may be problem with gradle, installisation. You could find answer here.

0

Just add a Scaffold as home: Scaffold and the Center as body: Center.

import 'package:flutter/material.dart';

void main() => runApp(MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text('Hello World'),
        ),
      ),
    ),
);
Sally
  • 35
  • 7
  • Always consider adding explanation about the code and the part of problem the code solves. It will help everyone reading the answer. All efforts are appreciated. Keep answering. – dev-aentgs Jun 24 '20 at 15:58