Build fails for Android
When building for Android, one gets the following error in the dart code: command: flutter build apk
lib/main.dart:34:25: Error: Can't declare a member that conflicts with an inherited one. State<MyHomePage> get createState => _MyHomePageState(); ^^^^^^^^^^^ ../../../../Dev/flutter/packages/flutter/lib/src/widgets/framework.dart:796:9: Context: This is the inherited member. State createState(); ^^^^^^^^^^^ Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
-
Where: Script '/Users/david/Dev/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1297
-
What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command '/Users/david/Dev/flutter/bin/flutter'' 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 1m 16s Running Gradle task 'assembleRelease'... 77.3s Gradle task assembleRelease failed with exit code 1