I'm a beginner to flutter. I use vscode for development. I also debug using my physical android device instead of an emulator. I built a simple flutter application. Executed using flutter run. After building, white screen popped in my phone and soon followed by the dialogue "Unfortunately, quiz_app has stopped.", where quiz_app is the project name. I have a Ryzen-5 Machine. Here is the output of $ flutter -v
:
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.720], locale en-IN)
• Flutter version 1.12.13+hotfix.8 at C:\src\flutter
• Framework revision 0b8abb4724 (5 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\haari\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.
[!] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
This is the console log when I do $ flutter run
:
Launching lib\main.dart on SM G531F in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 20.0s
√ Built build\app\outputs\apk\debug\app-debug.apk.
D/FlutterActivity( 8697): Using the launch theme as normal theme.
D/FlutterActivityAndFragmentDelegate( 8697): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate( 8697): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
E/DartVM ( 8697): version=2.7.0 (Fri Dec 6 16:26:51 2019 +0100) on "android_arm"
E/DartVM ( 8697): thread=8697, isolate=vm-isolate(0xab699540)
E/DartVM ( 8697): pc 0x54cfcfcd fp 0xffcb8e58 libflutter.so+0x1321fcd
E/DartVM ( 8697): -- End of DumpStackTrace
Here is the main.dart code:-
import 'package:flutter/material.dart';
void main() => runApp(QuizApp());
class QuizApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('JIT Quiz App'),
),
body: Column(
children: <Widget>[
Text('What is your favourite subject?'),
RaisedButton(child: Text('DBMS'), onPressed: null),
RaisedButton(child: Text('DAA'), onPressed: null),
RaisedButton(child: Text('CA'), onPressed: null),
RaisedButton(child: Text('PQT'), onPressed: null),
],
),
),
);
}
}
I am trying to avoid debugging using an emulator as much as possible.