Getting the following error wile running Flutter code on Android Studio. (Windows 10).
I am using android-studio-2020.3.1.22-windows
, Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1165], locale en-IN)
.
Launching libmain.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:open_appstore
For solutions, see https://dart.dev/go/unsound-null-safety
FAILURE: Build failed with an exception.
* Where:
Script 'C:srcflutterpackagesflutter_toolsgradleflutter.gradle' line: 1035
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:srcflutterbinflutter.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 11s
Exception: Gradle task assembleDebug failed with exit code 1
Not able to resolve the issue. But it is working, able to see the output when I run the command
flutter run --no-sound-null-safety
from terminal. What seems to be the issue?
2
Answers
The error is telling you to remove this package
open_appstore
. It doesn’t support null-safety.Remove it and it should compile.
The package you used doesn’t support null-safety, use null safety packages.