I Want to build project but i always get this error. I know it doesn't because of my code. But i don't understand.By the way i can run the application on emulator pixel 3. But i can't run in terminal. Maybe the terminal affecting the error.
You can click + and type flutter run again. It work for me
Related
I have a repeated terminal problem.
If i turn on the terminal and run the flutter doctor, it says command not found and it does not work.
So if i type [export PATH="$PATH:pwd/flutter/bin"] and enter the flutter doctor, it is worked
In addition, the flutter doctor was executed like this, but the version of cocoapods was low, causing continuous errors.
and then, i typeed [source ~/.zshrc] and [sudo gem install cocoapods]
I entered these and they work normally.
But I wonder if I have to go through these procedures every time I turn on the terminal.
I don't think this problem is a problem for me to run the flutter in vscode.
Can't I save the procedure I enter so that I don't find any errors when I run the flutter doctor right from the terminal?
If I can't do that, is there no problem using flutter in vscode even if I keep the current situation?
thank u
type [export PATH="$PATH:pwd/flutter/bin"]
type [source ~/.zshrc] and [sudo gem install cocoapods]
Try to do this:
Type: open ~/.zshrc
Edit inside your zshrc: PATH="$PATH:$HOME/development/flutter/bin". Well in my case, the flutter folder is in $HOME/development, replace this in your corresponding path.
Delete all of redundant other flutter/bin in zshrc.
Close your text edit & run source ~/.zshrc.
Exit your current terminal. If you are in vscode, close your terminal & exit vscode also.
My problem was that I didn't create a development folder at home. Creating and re-downloading the development folder resolved most issues.
I'm new in flutter and trying to learn about it for the first time.
I'm following the instruction of flutter documentation in here
When in step to the setting environment, I follow the instruction here.
After restarting the pc, the next step I must running the command flutter doctor in cmd.
In this step, I get stuck because in cmd, flutter doesn't response anything.
I try to execute flutter inside VSCode It still stuck with loading.
I also try to running with android studio, Still the same, I get stuck with loading
What should I do?
I missed the important thing.
Just don't put it in the privilege directory.
When I try to start my main.dart I get an error called
"Exception: Gradle task assembleDebug failed with exit code 1".
I'm running the default code when you create a new project with flutter create "name". When I run flutter doctor I get no errors, so I don't know what could be the problem. Some people said not enough space on disk. But I have about 50gbs left. I'm running on the android emulator with the pixel 4. Yesterday everything worked fine and today I wanted to create a new project, and now it doesn't work anymore. Even though I didn't change anything in the emulator settings or the VS Code settings/file.
Any help is appreciated
I believe this is the problem where the default gradle is outdated and sucj you need to update it, if you are using android studio, when opening a gradle file in teh top right corner it will say open for editing in android studio , click on it and it will open a new window, in the terminal run gradlew or gradlew upgrade.
also the flutter team said they were working on it, so try to update flutter to the latest version using the command flutter upgrade
I'm new to learning flutter when I try to crate a new project on android studio gives me a arror message in the event section enter image description here
The MESSAGE: [Could not find an option named "platforms". Run 'flutter -h' (or 'flutter -h') for available flutter commands and options.]
And another problem is flutter doctor does not see the android studio enter image description here
1(By the way, I want to use this version of flutter, please do not give a suggestion like update.)
2(this problem did not exist before, it happened after turning my computer off and on)
And sorry for my english mistakes
Thank you.
flutter version flutter_windows_v1.12.13+hotfix.9-stable
andorid studio version: 4.1.3
Is this the answer to your question about andorid studio?
and you need to install JDK
You are using the wrong flutter SDK. Too low information in your question. Make sure that you have the right path to flutter SDK in your IDE. Check that the flutter SDK directory has the appropriate structure, all needed files and cetera. Channel and version of flutter also may have an influence on this problem.
Got this today out of nowhere. Things were going well, but suddenly when I tried to relaunch the app from fresh, for the error Could not find an option named "target"
UPDATE:
This appears to happen when I switch branches and merge while app is running/flutter is attached. If you're using VS Code,
open your launch.json
change something, I decided to change type: "dart" to type: "notdart"
save
try to debug which fails
then revert that change.
This should fix the issue.
Previous Answer/If you're not using VS Code
What worked for me was to
flutter clean
close the editor (VS Code for me)
close the emulator
give a minute for things to close down
open task manager and kill any left over processes of dart.exe flutter.exe and java.exe and adb.exe (was doing Android)
start VS Code/Android Studio and try to debug again. (when prompted I chose to cold boot the emulator as well)
This takes a while as the emulator has to cold boot and since flutter clean was run, the compilation hadto start from scratch as well.
I have a small question.
When we debug app if we press r app reloads or R hot restart.
But how to run get flutter packages.
I cannot write the whole line flutter pug get it goes to new line in command prompt.
you can use another terminal/command prompt go to project directory to run flutter pub get.
but if you use VsCode it is very easy to run and debug the project
you can also use the terminal to run flutter pub get in it
VsCode provide run menu that really helps to run the project and when you save changes in pubspec.yaml it automatically get packages.
but make sure that you have install flutter and dart plugins in VsCode