0

I would like to start a Flutter counter app. So I prepared all and started the flutter counter project.

Then I got this error:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...

../../../../../flutter/packages/flutter/lib/src/material/app.dart:365:9: Error: Type 'GenerateAppTitle' not found. 

  final GenerateAppTitle? onGenerateTitle;

        ^^^^^^^^^^^^^^^^
../../../../../flutter/packages/flutter/lib/src/cupertino/app.dart:292:9: Error: Type 'GenerateAppTitle' not found.

  final GenerateAppTitle? onGenerateTitle;


        ^^^^^^^^^^^^^^^^
../../../../../flutter/packages/flutter/lib/src/material/app.dart:365:9: Error: 'GenerateAppTitle' isn't a type.

  final GenerateAppTitle? onGenerateTitle;

        ^^^^^^^^^^^^^^^^
../../../../../flutter/packages/flutter/lib/src/cupertino/app.dart:292:9: Error: 'GenerateAppTitle' isn't a type.

  final GenerateAppTitle? onGenerateTitle;

        ^^^^^^^^^^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\{mywindowsname}\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\{mywindowsname}\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 20s
Exception: Gradle task assembleDebug failed with exit code 1

I already tried everything within the following error question on "Execution failed for task ':app:compileFlutterBuildDebug'." error message until Jakub S. answer to remove .gradle folder. how to solve Execution failed for task ':app:compileFlutterBuildDebug'

Currently I think the problem is with the '"GenerateAppTitle" not found' message.

I tried the counter app on VS Code and Android Studio.

Nothing worked. What could the solution be?

My Car
  • 4,198
  • 5
  • 17
  • 50
  • Hi all,i solved it by removing flutter folder and download a new one. Perhaps i did something within the code. I dont know. – Elton123 Sep 10 '22 at 13:09

0 Answers0