Mob app code in flutter with vs code exited

I am studying mob app development.I created some basic examples using flutter and vs code.At first it worked well.Later it exited with the error message-Gradle task assembleDebug failed with exit code 1

Please help me to resolve the problem

Scroll up and see what the problem actually is.
It will have given you more output in practically all cases than just “exit code 1”.
Can you maybe share a build --scan URL?

full error log is very large.At the end it shows-Build failed with an exception :What went wrong:Execution failed for task ‘:app:compileFlutterBuildDebug:’ Some other error messages are like this–Error:Can’t find’)’ to match’(’ Bottom navigator Bar({ -Can’t find’}’ -Error :Expected an identifier but got’assert’ -Error:Classes can’t be declared inside other classes.Likewise it goes.But on examining the code no error.I created only the demo application(template)

Sounds like you wrote invalid code.
So there is nothing a Gradle forum could help you.
And with only these part excerpts it is also impossible to even guess what might be the problem.

Dear…I am trying to study mob app development using online tutorials.I created only a demo programme (template).It worked well at first.As lessons progressed,I was creating bottom navigation bar.In the code there was no error.But when the code was run it exited as stated above.Then I tried previous examples about ten of them.To my dismay all were not working.(They were working very well till then).So can’t say my code is invalid.

You provide no relevant information so how do you expect help my dear?
I asked for a build --scan URL and you did not provide it.
Without even providing the full error noone can guess what your problem might be.
Also, if you say your code fails at runtime, then how is the build tool involved?
Again, this is a Gradle forum, for problems you have with Gradle.

Dear… I am not an expert in computer/software technologies.Out of curiosity I am trying to study by referring to online tutorials. You mentioned -build --scan URL- .Actually I don’t know about it.Then how can I provide.I don’t know what and how it is .Sorry dear…I am a small boy student of 75years old,without having any formal education in computer.But I am interested very much in computer technology..that is why…

Call gradle with the parameter --scan, then you end up with a build scan URL in the output

Here is the error log

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text(widget.title),
          const SizedBox(height: 16),
          const Text('You have pushed the button this many times:'),
          Text('$_counter'),
          const SizedBox(height: 16),
          GestureDetector(
            onTap: _incrementCounter,
            child: Container(
              padding: const EdgeInsets.all(12),
              color: const Color(0xFF6200EE),
              child: const Text(
                'Increment',
                style: TextStyle(color: Color(0xFFFFFFFF)),
              ),
            ),
          ),
        ],
      ),
    );
  }
}

Sorry the above one is the actual code.Here is the error log

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:225:22: Error: Can't find ')' to match '('.
  BottomNavigationBar({
                     ^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:183:50: Error: Can't find '}' to match '{'.
class BottomNavigationBar extends StatefulWidget {
                                                 ^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:249:8: Error: Expected an identifier, but got 'assert'.
Try inserting an identifier before 'assert'.
       assert(
       ^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:249:8: Error: Expected '}' before this.
       assert(
       ^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:1: Error: Expected '{' before this.
class _BottomNavigationTile extends StatelessWidget {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:1: Error: Classes can't be declared inside other classes.
Try moving the class to the top-level.
class _BottomNavigationTile extends StatelessWidget {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:29: Error: Expected a class member, but got 'extends'.
class _BottomNavigationTile extends StatelessWidget {
                            ^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:37: Error: A method declaration needs an explicit list of parameters.
Try adding a parameter list to the method declaration.
class _BottomNavigationTile extends StatelessWidget {
                                    ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:626:1: Error: Classes can't be declared inside other classes.
Try moving the class to the top-level.
class _Tile extends StatelessWidget {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:626:13: Error: Expected a class member, but got 'extends'.
class _Tile extends StatelessWidget {
            ^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:626:21: Error: A method declaration needs an explicit list of parameters.
Try adding a parameter list to the method declaration.
class _Tile extends StatelessWidget {
                    ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:660:1: Error: Classes can't be declared inside other classes.
Try moving the class to the top-level.
class _TileIcon extends StatelessWidget {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:660:17: Error: Expected a class member, but got 'extends'.
class _TileIcon extends StatelessWidget {
                ^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:660:25: Error: A method declaration needs an explicit list of parameters.
Try adding a parameter list to the method declaration.
class _TileIcon extends StatelessWidget {
                        ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:697:1: Error: Classes can't be declared inside other classes.
Try moving the class to the top-level.
class _Label extends StatelessWidget {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:697:14: Error: Expected a class member, but got 'extends'.
class _Label extends StatelessWidget {
             ^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:697:22: Error: A method declaration needs an explicit list of parameters.
Try adding a parameter list to the method declaration.
class _Label extends StatelessWidget {
                     ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:775:1: Error: Classes can't be declared inside other classes.
Try moving the class to the top-level.
class _BottomNavigationBarState extends State<BottomNavigationBar> with TickerProviderStateMixin {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:775:33: Error: Expected a class member, but got 'extends'.
class _BottomNavigationBarState extends State<BottomNavigationBar> with TickerProviderStateMixin {
                                ^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:775:41: Error: A method declaration needs an explicit list of parameters.
Try adding a parameter list to the method declaration.
class _BottomNavigationBarState extends State<BottomNavigationBar> with TickerProviderStateMixin {
                                        ^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:775:68: Error: Expected '{' before this.
class _BottomNavigationBarState extends State<BottomNavigationBar> with TickerProviderStateMixin {
                                                                   ^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:775:68: Error: Expected a class member, but got 'with'.
class _BottomNavigationBarState extends State<BottomNavigationBar> with TickerProviderStateMixin {
                                                                   ^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:775:73: Error: A method declaration needs an explicit list of parameters.
Try adding a parameter list to the method declaration.
class _BottomNavigationBarState extends State<BottomNavigationBar> with TickerProviderStateMixin {
                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1155:1: Error: Classes can't be declared inside other classes.
Try moving the class to the top-level.
class _Bar extends StatelessWidget {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1155:12: Error: Expected a class member, but got 'extends'.
class _Bar extends StatelessWidget {
           ^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1155:20: Error: A method declaration needs an explicit list of parameters.
Try adding a parameter list to the method declaration.
class _Bar extends StatelessWidget {
                   ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1184:1: Error: Classes can't be declared inside other classes.
Try moving the class to the top-level.
class _Circle {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1226:1: Error: Classes can't be declared inside other classes.
Try moving the class to the top-level.
class _RadialPainter extends CustomPainter {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1226:22: Error: Expected a class member, but got 'extends'.
class _RadialPainter extends CustomPainter {
                     ^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1226:30: Error: A method declaration needs an explicit list of parameters.
Try adding a parameter list to the method declaration.
class _RadialPainter extends CustomPainter {
                             ^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:626:21: Error: 'StatelessWidget' is already declared in this scope.
class _Tile extends StatelessWidget {
                    ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:37: Context: Previous declaration of 'StatelessWidget'.
class _BottomNavigationTile extends StatelessWidget {
                                    ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:660:25: Error: 'StatelessWidget' is already declared in this scope.
class _TileIcon extends StatelessWidget {
                        ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:37: Context: Previous declaration of 'StatelessWidget'.
class _BottomNavigationTile extends StatelessWidget {
                                    ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:697:22: Error: 'StatelessWidget' is already declared in this scope.
class _Label extends StatelessWidget {
                     ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:37: Context: Previous declaration of 'StatelessWidget'.
class _BottomNavigationTile extends StatelessWidget {
                                    ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1155:20: Error: 'StatelessWidget' is already declared in this scope.
class _Bar extends StatelessWidget {
                   ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:37: Context: Previous declaration of 'StatelessWidget'.
class _BottomNavigationTile extends StatelessWidget {
                                    ^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:183:7: Error: The non-abstract class 'BottomNavigationBar' is missing implementations for these members:
 - StatefulWidget.createState
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.
class BottomNavigationBar extends StatefulWidget {
      ^^^^^^^^^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/widgets/framework.dart:800:9: Context: 'StatefulWidget.createState' is defined here.
  State createState();
        ^^^^^^^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1277:1: Error: Expected '{' before this.
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:1: Error: Expected a function body, but got 'class'.
class _BottomNavigationTile extends StatelessWidget {
^^^^^
../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:446:1: Error: Expected a function body, but got '{'.
class _BottomNavigationTile extends StatelessWidget {
^
Target kernel_snapshot_program failed: Exception


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\Varghese\Documents\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 4s
Running Gradle task 'assembleDebug'...                              4.9s
Error: Gradle task assembleDebug failed with exit code 1

The error seems quite clear to me from Gradle side.
The syntax in the bottom_navigation_bar.dart file is incorrect.
Whatever that file is, maybe you accidentally edited it or something.
Without knowing that language, I’d say you deleted a line like }) and all other errors are resulting from that.

But as I said, this problem has nothing to do with Gradle, other than that you use Gradle to run your build and so your question is totally off-topic here. You should ask in some Flutter community how to get this resolved.

Once again I will tell what happened…Referring to online tutorials I prepared small programmes.All it worked well in my emulator in the computer.As the lessons progressed I prepared around 9 small examples as instructed in the tutorials.All worked well .Then came the lessons on Bottom Navigation Bar.I prepared an example for it as instructed.But when tried to run, the problem started.Then I tried the previous examples.But all exited with the same error log,pertaining to the Bottom Navigation Bar code.Here I am confused.Then I tried making a new programme .Again on running it the same error.So I doubt which ever code I try to run,It goes to the code of Bottom Navigation Bar…
One friend told me that it is because of the leakage in random Memmory.He also doubted ,my RAM is over used by the emulator.He says the Bottom Navigation Bar code is leaked and stored in my RAM.So always it is working…Something like that.Because I am not well versed in the subject,I could not catch up what all this is ,and how can this rectified.He says the only remedy is to correct the memmory leakage.But I couldn’t get the remedial measures…Any idea?

This has nothing to do with RAM.
The code in the bottom_navigation_bar.dart simply is invalid.
As you see from the path ../../../Documents/flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart, this is not a file in your project, but some file in some flutter library, as Flutter has an imho really strange setup where you include the packages source-wise and always compile it with your project.

So my guess - as I already said - is, that you somehow accidentally deleted a line in that common file, which then also makes your other projects fail to build as they use the same common file that you probably corrupted.

But again, this has nothing to do with Gradle and thus is off-topic here.
Ask in some Flutter community that know about those stuff and how to fix it.
This is a Gradle community for problems with Gradle.
Getting a compile error is not a Gradle problem.