first time "get create project" then show "? (Use arrow keys) > Flutter Project Unhandled exception: Null check operator used on a null value" - dart-pub

When I run :
get create project
show :
? (Use arrow keys)
> Flutter Project
Get Server
then i got message :
Unhandled exception:
Null check operator used on a null value
#0 ListChooser._userInput (package:cli_dialog/src/list_chooser.dart:126:27)
#1 ListChooser.choose (package:cli_dialog/src/list_chooser.dart:46:21)
#2 CLI_Dialog._getListAnswer (package:cli_dialog/src/dialog.dart:352:27)
#3 CLI_Dialog._askListQuestion (package:cli_dialog/src/dialog.dart:148:5)
#4 CLI_Dialog._standardOrderNoNavigation (package:cli_dialog/src/dialog.dart:473:7)
#5 CLI_Dialog._standardOrder (package:cli_dialog/src/dialog.dart:458:7)
#6 CLI_Dialog.ask (package:cli_dialog/src/dialog.dart:129:7)
#7 Menu.choose (package:get_cli/common/menu/menu.dart:17:27)
#8 CreateProjectCommand.execute (package:get_cli/commands/impl/create/project/project.dart:27:25)
#9 main (file:///C:/Users/myusername/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/get_cli-1.7.1/bin/get.dart:18:23)
#10 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:32)
#11 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
I have correlated error too, when i try to activate get_cli :
when I run
flutter pub global activate get_cli
I got message :
Installed executables get and getx.
Warning: Executable "get" runs "bin\get.dart", which was not found in get_cli.
Warning: Executable "getx" runs "bin\get.dart", which was not found in get_cli.
Activated get_cli 1.7.1.
My Specifications:
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.5, on Microsoft Windows [Version
10.0.19044.1645], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[!] Visual Studio - develop for Windows (Visual Studio Build Tools 2017 15.9.33)
X Visual Studio 2019 or later is required.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all
of its default components
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Community Edition (version 2019.3)
[√] Connected device (3 available)
[√] HTTP Host Availability
! Doctor found issues in 1 category.
OS = Windows 10

Related

Out of memory when running app with Emulator on Android studio?

I run my app on Emulator of Android Studio 4.1.1 with exception:
../../third_party/dart/runtime/vm/zone.cc: 94: error: Out of memory.
version=2.10.4 (stable) (Wed Nov 11 13:35:58 2020 +0100) on "windows_x64"
pid=19872, thread=13300, isolate_group=main(000001D8CE0F0B60), isolate=main(000001D8CE117730)
isolate_instructions=7ff70550f230, vm_instructions=7ff70550f240
pc 0x00007ff7056a00ec fp 0x0000005f752fdff0 Unknown symbol
-- End of DumpStackTrace
flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.18363.1198], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.49.0)
[√] Connected device (1 available)
I can run my app with real device.

Error : Parameter format not correct - flutter in android studio

I am new to Flutter & I've been stuck to one problem. I cannot run my app because it says :
flutter run
Using hardware rendering with device sdk gphone x86 arm. If you get graphics artifacts, consider
enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on sdk gphone x86 arm in debug mode...
Parameter format not correct -
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 24.7s
Exception: Gradle task assembleDebug failed with exit code -1
flutter doctor
[√] Flutter (Channel stable, v1.17.1, on Microsoft Windows [Version 10.0.18362.1139], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.50.1)
[√] Connected device (1 available)
• No issues found!
It's been three days and I'm totally confused? Please help!
There are multiple way to test this:
Downgrade or Upgrade your Flutter SDK (Easiest One).
Check for Environment Variable you had set either they are correct like Flutter
SDK path, Android Studio Path.
Try changing the Drive where Flutter SDK is setup and continue with step 2.
I was having same issue but downgrading works for me.

Flutter Doctor, Android licenses status unknown

Flutter doctor says that my android license status cannot be found.
[√] Flutter (Channel stable, 1.20.3, on Microsoft Windows [Version 10.0.19041.450], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.
[√] Android Studio (version 4.0)
[√] VS Code (version 1.48.2)
[!] Connected device
! No devices available
I did try running flutter doctor --android-licenses
that returned me with the following error
flutter doctor --android-licenses
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:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
What am I missing here?
I had the same problem.
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (7 days ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale es-ES)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.57.1)
[✓] Connected device (1 available)
! Doctor found issues in 1 category.
I have achived the solution on the next way:
1.- Open a terminal window.
2.- Set the environemnt var JAVA_HOME to the path where the jdk 8 ist. in my case is:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
3.- Run the command: flutter doctor --android-licenses
Thesethree steps haven resolved my problem.
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale es-ES)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.57.1)
[✓] Connected device (1 available)
• No issues found!
Save the value of your JAVA_HOME environment variable, then remove the JAVA_HOME environment variable if it exists.
Save the value of your jdk path. Remove your jdk from your PATH.
With those changes made, the flutter doctor --android-licenses should work.
If applicable, restore your JAVA_HOME environment variable and jdk in your path.
If that doesn't work, uninstall Android Studio and XCode, download the latest copies and reinstall.
If you can't resolve the issue, look at this thread: https://github.com/flutter/flutter/issues/28230

I want to run flutter on windows 7 with my android phone as a emulator . truned on my debugging mode. How can i fix issue of flutter doctor command

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 6.1.7601], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[!] Android Studio (version 3.4)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.35.1)
!] Connected device
! No devices available
! Doctor found issues in 3 categories.
You have to accept licences agreement from the android SDK
You can type this command sdkmanager --licenses or navigate to your SDK folder and type tools/bin/sdkmanager --licenses.
This will ask you if you want to review non-accepeted licenses. You just have to type y to accept or n if you want to decline.
PS: Don't forget to connect your device and test debug mode with adb devices
Open VS Code, then download Dart and flutter plugin. Don't forget to implement the fix given by #user8773560

Flutter doctor search location

Where does flutter doctor command look for Android Studio, Visual Studio Code etc. Mine is not detecting VSCode even if I have installed it.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.2.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Android Studio (version 3.3)
[✓] Android Studio (version 3.4)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
! Doctor found issues in 2 categories
I don't use Intellij with flutter, so I can simply ignore that warning.
I'm on Manjaro i3 and tried installing both VSCode open source (from Arch Community Repository) and MS branded version (from Arch User Repository) though pacman.
You can add VS Code to your PATH,then it will be solved.
Launch VS Code.
Open the Command Palette (Ctrl+Shift+P) and type 'shell command' to find the Shell Command:
Install 'code' command in PATH command.

Resources