"Cannot run with sound null safety" trying to use Google Maps with Flutter - flutter

When I try running Google Maps on Android Studio Emulator I am getting an error message. It does mention some links on where to go on how to solve the problem, but I still don't get it.
The error is:
***
**Launching lib\main.dart on Android SDK built for x86 in debug mode...**
***
lib\main.dart:1
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:google_maps_flutter
- package:google_maps_flutter_platform_interface
- package:stream_transform
- package:plugin_platform_interface
For solutions, see https://dart.dev/go/unsound-null-safety
3
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\14706\Desktop\CODES\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1070
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\14706\Desktop\CODES\Flutter\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 52s
Exception: Gradle task assembleDebug failed with exit code 1
***
**Exited (sigterm)**
***

Run this command in the project terminal and then run your app.
flutter pub upgrade --major-versions

Related

my flutter application is crashing when i run it on android emulator but it works fine on window, what should i do

Launching lib\main.dart on AOSP on IA Emulator in debug mode...
e:
file:///R:/flutter_windows_3.3.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/share_plus-3.1.0/android/src/main/kotlin/dev/fluttercommunity/plus/share/MethodCallHandler.kt:34:24
Type mismatch: inferred type is String? but String was expected
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':share_plus:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details
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 43s Exception: Gradle task assembleDebug failed with exit code 1 Exited
(sigterm)
i tried to search the problem but i didn't get relevant answer

When I try to run the sample code app on the Android emulator to do flutter with vscode, I get an error

FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\inubo\Downloads\flutter_windows_3.3.7-stable\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1165
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\inubo\Downloads\flutter_windows_3.3.7-stable\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 5s
Exception: Gradle task assembleDebug failed with exit code 1
I tried to flutter with vscode to produce an app and it worked until setup, but when I finally try to debug the sample code app in the Android emulator, I get an error. Debugging with Edge and Chrome is successful.
flutter clean
flutter pub get
Remove pubspec.look
I tried, but these did not work.

Flutter Update issues

My flutter code works perfectly fine and I have run multiple tests on it.
I just decided to install the new VS code updates and restart my VS code application.
All of the sudden I started having the error below and I have searched the entire code for the method but none was found
Launching lib\main.dart on Android SDK built for x86 in debug mode...
lib\main.dart
../../../flutter_windows_1.22.3-stable/flutter/packages/flutter/lib/src/widgets/navigator.dart:3783:32: Error: Getter not found: 'deoNotPop'.
case RoutePopDisposition.deoNotPop:
^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\temp\flutter_windows_1.22.3-stable\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\temp\flutter_windows_1.22.3-stable\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 1m 26s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
Someone, please help me
It looks like you may have inadvertedly modified a Flutter SDK file:
flutter/packages/flutter/lib/src/widgets/navigator.dart
case RoutePopDisposition.deoNotPop:
This should say doNotPop and not doeNotPop. Removing the e and saving the file should fix it. You can run git status in your Flutter SDK to see if there are other changes that may need reverting.

FAILURE: Build failed with an exception.(FLUTTER)

Hey guys I jut wanted to debug a recent project, but when I tried it, I got an error.
This is the error:
Launching lib\main.dart on SM A202F in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> java.lang.NullPointerException (no error message)
* 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 18s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
I searched the internet and found that it could be related to a flutter update.
Could that be?
And what is the solution for this problem?
try:
flutter upgrade
then:
flutter run -v
It may help you.

Why can't i run my flutter app in vs code terminal/cmd if my previous apps went on android studio?

When i type "flutter run" in folder of my app created in VS CODE or cmd i get this error:
Launching lib\main.dart on LG H870 in debug mode...
Target file "C:\Users\Kwiat\Documents\\Users\Kwiat\Documents\\Users\Kwiat\Documents\Projects\Flutter\kaka\kaka\build\app\intermediates\flutter\debug\android-arm64/flutter_assets" not found.
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 765
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebugArm64'.
> Process 'command 'C:\src\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 2s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
Why i haven't got flutter_assets file and Target file path is so weird? How to fix it to run my apps?
Ok, i just realised that flutter doesn't support foldernames with'!' in it. I tried to create project in folder without '!' and it worked.