When assembleDebug Out of Memory error is thrown

1

So I'm new to flutter and dart.I've made multiple android apps and I am pretty familiar with coding but I just can't get to know flutter. I use Android Studio as Ide and when I try to compile my code , on the assembleDebug part, This error is thrown:

c:\b\s\w\ir\k\src\third_party\dart\runtime\vm\zone.cc: 54: error: Out 
of memory.
version=2.4.0 (Wed Jun 19 11:53:45 2019 +0200) on "windows_x64"
thread=1336, isolate=main(0000029506C2CDE0)
pc 0x00007ff7b33d2b1b fp 0x000000d10cbfb0a0 Unknown symbol
-- End of DumpStackTrace

For now, I haven't done anything to fix the problem because I don't know why

main.dart

import 'package:flutter/material.dart';
import 'constants.dart';
import 'package:flutter_svg/flutter_svg.dart';


void main() {
  runApp(UnitConverterApp());
}


//on create
class UnitConverterApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Distivity Todolist',
      theme: Constants.getTheme(),
      home: CategoryRoute(),
    );
  }
}

class CategoryRoute extends StatefulWidget {
  const CategoryRoute();

  @override
  _CategoryRouteState createState() => _CategoryRouteState();
}

class _CategoryRouteState extends State<CategoryRoute> {



  /// Function to call when a [Category] is tapped.
  void _onCategoryTap() {
    setState(() {

    });
  }

  @override
  Widget build(BuildContext context) {
      return Center(

        child: InkWell(

          onTap: () => _onCategoryTap(),

          child: SvgPicture.asset(
              Constants.add,
              semanticsLabel: 'ad'
          ),


        )


      );



  }
}

constants.dart

import 'package:flutter/material.dart';


  class Constants{

   static ThemeData getTheme(){
    return ThemeData(
      primaryColor: colorSwatch,
    );
  }

   static const primaryColor =  0xff4FB484;

   static ColorSwatch colorSwatch = ColorSwatch(primaryColor, const<String,Color>{
     "primary_color":  Color(primaryColor),
     "primary_dark":Color(0xff306D50),
     "black_16":  Color(0xff161616),
     "black_20":Color(0xff202020),
     "the_blackest":Color(0xff000000),
     "color_white":Color(0xffF7F7F7),
     "the_whitest":Color(0xffffffff)

   });


   static const String add = 'assets/add.svg';

}

pubspec.yaml

name: distivity_todolist
description: A new Flutter application.

https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  cupertino_icons: ^0.1.2

dev_dependencies:
  flutter_svg: 0.13.1
  flutter_test:
    sdk: flutter

flutter:

  uses-material-design: true


  assets:
    - assets/add.svg
flutter
dart
asked on Stack Overflow Jul 14, 2019 by Alex Toto

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0