flutter doctor –android-licenses gives a java error

Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156) at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75) at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73) at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) … 5 more I get this error above when running flutter doctor –android-licenses. Does anyone know why this is happening and how I can fix it? I’m already running … Read more

How to do Rounded Corners Image in Flutter

I am using Flutter to make a list of information about movies. Now I want the cover image on the left to be a rounded corners picture. I did the following, but it didn’t work. Thanks! getItem(var subject) { var row = Container( margin: EdgeInsets.all(8.0), child: Row( children: <Widget>[ Container( width: 100.0, height: 150.0, decoration: … Read more

Scaffold.of() called with a context that does not contain a Scaffold

As you can see, my button is inside the Scaffold‘s body. But I get this exception: Scaffold.of() called with a context that does not contain a Scaffold. import ‘package:flutter/material.dart’; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: ‘Flutter Demo’, theme: ThemeData( primarySwatch: Colors.blue, ), home: HomePage(), … Read more

Flutter – Wrap text on overflow, like insert ellipsis or fade

I’m trying to create a line in which center text has a maximum size, and if the text content is too large, it fits in size. I insert the TextOverflow.ellipsis property to shorten the text and inserting the triple points … but it is not working. main.dart import ‘package:flutter/material.dart’; void main() { runApp(new MyApp()); } … Read more

Message “flutter run: No connected devices”

I am trying to create a sample application with Flutter (fresh installation). Android Studio is also installed (fresh installation). Here is the output of flutter run flutter run No connected devices. The output of flutter doctor: Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v0.1.5, on Linux, locale en_US.UTF-8) … Read more

Waiting for another flutter command to release the startup lock

When I run my flutter application it show Waiting for another flutter command to release the startup lock this messages and not proceed further. 34 Answers 34 In my case, following command in Terminal helped (as suggested by Günter): killall -9 dart On Windows (as suggested by upupming): taskkill /F /IM dart.exe

How can I dismiss the on screen keyboard?

I am collecting user input with a TextFormField and when the user presses a FloatingActionButton indicating they are done, I want to dismiss the on screen keyboard. How do I make the keyboard go away automatically? import ‘package:flutter/material.dart’; class MyHomePage extends StatefulWidget { MyHomePageState createState() => new MyHomePageState(); } class MyHomePageState extends State<MyHomePage> { TextEditingController … Read more

No Firebase App ‘[DEFAULT]’ has been created – call Firebase.initializeApp() in Flutter and Firebase

I am building a Flutter application and I have integrated Firebase, but I keep getting this error when I click on a button either to register, login or logout. I have seen other people have asked the same question, but none seems to work for me. I am using Flutter and Android Studio. How can … Read more