Skip to content

When run flutter gallery loaclly, faced with exception with Syntax Error when try to pub get. #117610

@AndrewWayne

Description

@AndrewWayne

Steps to Reproduce

  1. Follow the document and switch my channel to master and upgraded.
  2. Clone
  3. git clone flutter/gallery project locally
  4. follow the step run flutter pub get
  5. pumped out:

Generating synthetic localizations package failed with 1 error:
Exception: Found syntax errors.

Logs

Logs
       Exception: Found syntax errors.
       #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
       #1      generateLocalizationsSyntheticPackage (package:flutter_tools/src/dart/generate_synthetic_packages.dart:67:5)
       <asynchronous suspension>
       #2      PackagesGetCommand._runPubGet (package:flutter_tools/src/commands/packages.dart:132:7)
       <asynchronous suspension>
       #3      PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:175:5)
       <asynchronous suspension>
       #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1275:27)
       <asynchronous suspension>
       #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
       <asynchronous suspension>
       #6      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
       <asynchronous suspension>
       #7      FlutterCommandRunner.runCommand.<anonymous closure>
       (package:flutter_tools/src/runner/flutter_command_runner.dart:290:9)
       <asynchronous suspension>
       #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
       <asynchronous suspension>
       #9      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
       <asynchronous suspension>
       #10     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:64:9)
       <asynchronous suspension>
       #11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
       <asynchronous suspension>
       #12     main (package:flutter_tools/executable.dart:91:3)
       <asynchronous suspension>

Flutter doctor shows

[✓] Flutter (Channel master, 3.7.0-13.0.pre.63, on Microsoft Windows [版本 10.0.22621.963], locale zh-CN)
• Flutter version 3.7.0-13.0.pre.63 on channel master at C:\src\flutter
• Upstream repository https://git.sjtu.edu.cn/sjtug/flutter-sdk.git
• FLUTTER_GIT_URL = https://git.sjtu.edu.cn/sjtug/flutter-sdk.git
• Framework revision 393e156 (5 hours ago), 2022-12-23 20:38:23 -0500
• Engine revision e3edfadbda
• Dart version 3.0.0 (build 3.0.0-63.0.dev)
• DevTools version 2.20.0
• Pub download mirror https://mirror.sjtu.edu.cn/dart-pub
• Flutter download mirror https://mirror.sjtu.edu.cn

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
flutter config --android-sdk to update to that location.

[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✗] Visual Studio - develop for Windows
✗ Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components

[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[✓] VS Code (version 1.74.2)
• VS Code at C:\Users\andre\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.56.0

[✓] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.22621.963]
• Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.125
• Edge (web) • edge • web-javascript • Microsoft Edge 108.0.1462.54

[✓] HTTP Host Availability
• All required HTTP hosts are available

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions