I'm getting errors while running my flutter app - flutter

Hey there I'm building an audio app using audioplayers package in flutter and in my code I don't have any error but when I run my app using flutter run, I'm getting these errors attached in the image.

Try Following Commands
Step 1->
flutter clean
Step 2->
flutter pub get
Step 3->
flutter run

Try Following Commands
flutter clean
then run
flutter pub get
OR
Delete your flutter cache folder inside flutter/bin directory and then try to run

Related

Flutter APK size it's greater than 150mb

i'm having some problems while compiling my flutter app for Android.. I've only 3 assets and a couple packages added, but when I try to compile, I got this:
√ Built build\app\outputs\flutter-apk\app-release.apk (158.3MB).
Any idea?
Flutter build log (running flutter build apk)
PS C:\\Users\\Admin\\Desktop\\Fictix\\Don't Touch This\\app\\dtt_app\> flutter build apk
Building with sound null safety
First of all, you can try clearing the cache via terminal.
flutter clean
This command will delete few temporary folders, specially "build/", ".dart_tools/" and ".packages/".
You can also run the following code from the terminal before the build phase of your application.
flutter build appbundle --target-platform android-arm,android-arm64
Of course, it is not a 100% method, but it can work in reducing your application size.
You can follow the steps below to clear it by Android Studio.
Tools > Flutter > Flutter Clean
Make your app with no sound null safety
From Terminal Run This Command
flutter build apk --split-per-abi --no-sound-null-safety
or
flutter build apk --release --no-sound-null-safety
If your problem still persists
// #2.9 in the top remove the parameter from Const app_name();
Run --no-sound-null-safety from terminal
Edit your Configure File and write in Additional run args:- --no-sound-null-safety

I am having a problem building a Flutter App

I has a build a flutter app before successfully, but I try to update the code of my flutter app because I discovered some bugs but when j try to build it I get a error about error configuring video_player Android, I try to add it as a Dependencies but still it didn't work, I also invalidate cache's too it didn't work because it also said something about Cache's, I also upgraded my flutter SDK, still it didn't work, I will attach a image under this write up.
The error I am facing 😭😪
The error I am facing 😭😪
Write below command in terminal to clear cache with android project path.
flutter pub cache clean
./gradlew clean
gradlew cleanBuildCache

Image picker flutter issue

when I try to use image_picker and run the flutter project it gives me error
A problem occurred configuring project ':image_picker_android'.
Could not load compiled classes for build file 'C:\Users\ZerpSteve\Documents\flutter_windows_2.10.2-stable\flutter.pub-cache\hosted\pub.dartlang.org\image_picker_android-0.8.5\android\build.gradle' from cache.
Use this command in your flutter project folder and rerun your project.
flutter clean && flutter pub get

APK building failed in flutter

I've been trying to build an apk for my app but its failing and I don't understand why
this is what is shwoing
i tried to build using this command that was given to me in comments
flutter build apk --no-tree-shake-icons
but its showing me this new error now
Try add this when build your apk --no-tree-shake-icons
Generally, for errors that seem odd like this, running flutter clean then flutter pub get in the terminal helps.

I cannot seem to download/install the carousel_slider package through pubspec.yaml

i have ran flutter pub get multiple times but I'm still not able to download the carousel_slider package
So far I've tried:
Running flutter clean
Running flutter packages get
Running flutter packages get
Restarting my computer
Updated flutter
Tried opening it in VSCode instead
Added another package (but that did install, I could see it in the Dart Packages)
I see that is working well, but you can try deleting the pubspect.lock
In the terminal write this commands:
flutter clean
flutter packages get