PS E:flutter codesappscropco> flutter run
Launching libmain.dart on vivo 1904 in debug mode…
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:9: Error: Expected ‘;’ after this.
codec and their platform-specific
^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:19: Error: Expected ‘;’ after this.
codec and their platform-specific
^^^^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:27: Error: Operator declarations must be preceded by the keyword ‘operator’.
Try adding the keyword ‘operator’.
codec and their platform-specific
^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:27: Error: A method declaration needs an explicit list of parameters.
Try adding a parameter list to the method declaration.
codec and their platform-specific
^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:28: Error: Expected ‘{‘ before this.
codec and their platform-specific
^^^^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:28: Error: Variables must be declared using the keywords ‘const’, ‘final’, ‘var’ or a type name.
Try adding the name of the type of the variable or the keyword ‘var’.
codec and their platform-specific
^^^^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:28: Error: Expected ‘;’ after this.
codec and their platform-specific
^^^^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:3: Error: ‘codec’ isn’t a type.
codec and their platform-specific
^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:284:21: Context: This isn’t a type.
final MethodCodec codec;
^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:13: Error: Type ‘their’ not found.
codec and their platform-specific
^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:3: Error: Not a constant expression.
codec and their platform-specific
^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:13: Error: ‘their’ isn’t a type.
codec and their platform-specific
^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:487:12: Error: The method ‘_invokeMethod’ isn’t defined for the class ‘MethodChannel’.
- ‘MethodChannel’ is from ‘package:flutter/src/services/platform_channel.dart’ (‘/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart’).
Try correcting the name to the name of an existing method, or defining a method named ‘_invokeMethod’.
return _invokeMethod(method, missingOk: false, arguments: arguments);
^^^^^^^^^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:581:18: Error: Superclass has no method named ‘_invokeMethod’.
return super._invokeMethod(method, missingOk: true, arguments: arguments);
^^^^^^^^^^^^^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:277:9: Error: Constructor is marked ‘const’ so all fields must be final.
const MethodChannel(this.name, [this.codec = const StandardMethodCodec(), BinaryMessenger? binaryMessenger ])
^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:9: Context: Field isn’t final, but constructor is ‘const’.
codec and their platform-specific
^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:19: Context: Field isn’t final, but constructor is ‘const’.
codec and their platform-specific
^
/E:/src/flutter/packages/flutter/lib/src/services/platform_channel.dart:321:28: Context: Field isn’t final, but constructor is ‘const’.
codec and their platform-specific
^
Target kernel_snapshot_program failed: Exception
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:compileFlutterBuildDebug’.
Process ‘command ‘E:srcflutterbinflutter.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 17s
Running Gradle task ‘assembleDebug’…
- I am getting this error while trying to run all the flutter apps which was running properly till morning*
I have tried changing dependancy ,clean the project,rebuilt it,also restarted the PC ,created new project and copy the codes of previous project but these didn’t worked out………..
my pubspec.yaml:
name: your_project_name
description: A new Flutter project
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
firebase_core: ^2.1.1
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
my main.dart file:
import 'package:cropco/screens/frontscreen.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
final theme = ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
brightness: Brightness.dark,
seedColor: const Color.fromARGB(255, 131, 57, 0),
),
textTheme: GoogleFonts.latoTextTheme(),
);
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
home: FrontScreen(),
);
}
}
Maheswari Vaishno Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3