after running flutter doctor in vscode
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 10.0.17134.165], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
X Android license status unknown.
[X] Android Studio (not installed)
[√] IntelliJ IDEA Ultimate Edition (version 2018.2)
[!] VS Code, 64-bit edition (version 1.26.0)
[!] Connected devices
! No devices available
! Doctor found issues in 4 categories.
to fix Android license status unknown. i've tried to run on vscode terminal
flutter doctor --android-licenses
but i get this msg
flutter' is not recognized as an internal or external command,
operable program or batch file.`
now i've installed memuPlayer its an android emulator and its working fine with Intelij but seems like vscode just can't recognize it
I've tried to run --enable-software-rendering on terminal but i got this msg
'--enable-software-rendering' is not recognized as an internal or external command,
operable program or batch file.
tried on terminal cmd and shell too any help!
I'm not a Windows expert, but I think you have to put the path to the flutter binary in your PATH environment variable. Or you could call it with an absolute path (in the terminal, e.g. C:\your\install\location\flutter\bin\flutter --android-licenses).
Add flutter to your environment path (System Properties -> Advanced -> Environment Variables -> Use variables for user -> Path -> new -> add the path to flutter\bin dir) to remove the flutter is not recognized as a internal or external command
Related
I'm new to flutter and I want to make the default flutter app to show up on my Android emulator. The emulator starts up fine but the process fails at "gradle task assembleDebug". I reinstalled everything ranging from Android Studio to flutter and dart and also deleting the AVD from Android Studio then creating it again but nothing seems to work. I tried a few potential fixes from youtube and google searches involving running a "gradle wrapper" command at the root directory but that doesn't work too as the root directories of all flutter apps lacks the "build.gradle" file. Flutter doctor does not show any problems.
"flutter doctor" command output:
PS C:\Users\Mahmud Alam\Desktop\Programming Stuff\Flutter&Dart\newproj\firstapp> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.22000.675], locale en-US)
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.10)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.67.2)
[√] Connected device (4 available)
[√] HTTP Host Availability
• No issues found!
Error output in command line:
PS C:\Users\Mahmud Alam\Desktop\Programming Stuff\Flutter&Dart\newproj\firstapp> flutter run
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on sdk gphone x86 in debug mode...
'Dart\newproj\firstapp\android\' is not recognized as an internal or external command,
operable program or batch file.
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
Running Gradle task 'assembleDebug'... 19.6s
Exception: Gradle task assembleDebug failed with exit code 1
I get the feeling that something is missing from somewhere but I cant figure out where and how to restore the files that are missing. Also, I'm running an emulation of Pixel 2 API 30 (android x86). But that alone should not cause any problems. How do I fix this?
Edits: [Folder Structure Screenshots]
I think this is your "&" of Flutter&Dart which cause the problem.
Try running flutter clean in your terminal and then rebuilding the app, that's worked for me in the past.
Delete the flutter cache (/bin/cache);
Delete gradlew and gradlew.bat in android folder (and in some cases android/gradle/wrapper/gradle-wrapper.jar too);
Run flutter run again.
This steps worked for me.
When I m trying to compile my app it is showing [!] No Android SDK found. Try setting the ANDROID_SDK_ROOT environment variable.
But when I run it shows-
Doctor summary (to see all details, run flutter
doctor -v):
[✓] Flutter (Channel master, 1.27.0-5.0.pre.94, on
Linux, locale C.UTF-8)
[✗] Chrome - develop for the web (Cannot find
Chrome executable at google-chrome)
! Cannot find Chrome. Try setting
CHROME_EXECUTABLE to a Chrome executable.
[✗] Flutter IDE Support (No supported IDEs
installed)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
Byw I m using VS Code but on termux and I m new to flutter and this is my first app.
Set ANDROID_SDK_ROOT variable under system variables.
You also need to restart the android studio after setting system variable.
For ex.
ANDROID_SDK_ROOT = "C:\Android\SDK"
This is for Ubuntu. Change the path to your SDK directory.
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
This is for windows. Change the path to your SDK directory.
set ANDROID_SDK_ROOT="C:\installation location\android-sdk"
This is for windows. Change the path to your SDK directory.
on windows
set ANDROID_SDK_ROOT="C:\installation location\android-sdk"
on linux
export ANDROID_SDK_ROOT=/usr/lib/android-sdk
I installed android-sdk and flutter-git on Manjaro with AUR. I set and exported the vars ANDROID_HOME and ANDROID_SDK_ROOT === /opt/android-sdk.
However, when I run flutter doctor the android sdk seems to not been recognized.
I will use flutter on vs-code.
How can I set up all this correctly?
What I did:
export ANDROID_HOME=/opt/android-sdk/
export ANDROID_SDK_ROOT=/opt/android-sdk/
Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.19.0-4.0.pre.75, on Linux, locale
en_CA.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android
SDK components.
(or visit
https://flutter.dev/docs/get-started/install/linux#android-setu
p for detailed instructions).
If the Android SDK has been installed to a custom location, set
ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.
[!] Android Studio (not installed)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
Run Android Studio, create a new project and run it
The main problem was the jdk version, I was using version 10. The recommend one is version 8 because the java.se.ee class.
Steps
Use this command or use the "Add/Remove Softare"
yaourt -S flutter-bin android-sdk android-sdk-platform-tools
Choose the open jdk 8 and run all commands below:
sudo chown -R $USER:$USER /opt/*
flutter precache && flutter doctor
If "Android Licenses are unkown", run flutter doctor --android-licenses
These steps will automatically set all env vars such as "ANDROID_HOME" but if you get any error, export them using the path to android-sdk, that will be /opt/android-sdk/
After Xcode code build flutter run
ProcessException: Process timed out:
Command: /usr/bin/env xcrun xcodebuild -configuration Debug -quiet -workspace
Runner.xcworkspace -scheme Runner
BUILD_DIR=/Users/Huzeifah/Documents/flutter_development/test_app/build/ios
-sdk iphonesimulator -arch x86_64
SCRIPT_OUTPUT_STREAM_FILE=/var/folders/w8/nf0h0vbj01v4qz3wbk07fvnr0000gn/T/flu
tter_build_log_pipe.O5hXp2/pipe_to_stdout FLUTTER_SUPPRESS_ANALYTICS=true
COMPILER_INDEX_STORE_ENABLE=NO -showBuildSettings
All version information when run flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.3 19D76, locale en-PK)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup
for detailed instructions).
If the Android SDK has been installed to a custom location, set
ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[!] Android Studio (not installed)
[✓] VS Code (version 1.45.1)
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.
When I run flutter. Xocde build done then give the Error ProceesTimw out. Then I try every thing that i can try. I install new vwesion of Xcode 11.4.1 and flutter new version 1.17 stable enter image description here
For me, I had the same issue and resolved it by moving my project out of a folder that iCloud was backing up. I had moved to a place with slower wifi, so my project kept hanging. Now, it loads faster than it did before.
Credit here (iOS simulator not working or taking so much time in Flutter)
This usually happens when you update xcode to fix this use Flutter upgrade in your general terminal and go to your project code editor and run Flutter clean and run flutter run if you face any other issues let me know......
i can't update the sdk tools, i don't know why, if use this command "sdkmanager --update" or "android update sdk" it will give me error like this title :
Warning: An error occured during installation: Failed to move away or delete existing target file: C:\androidSDK\sdk\tools
big thanks if you can help me!
1) Rename C:\Users\%username%\AppData\Local\Android\Sdk\tools folder to tool
2) Navigate to cd C:\Users\%username%\AppData\Local\Android\Sdk\tool\bin in cmd
3) And run sdkmanager --update --verbose, will create a new folder tools
4) Run flutter doctor --android-licenses
5) Then Accept the android licenses by clicking y
6) flutter doctor command will show the following:
Kishore Kumar#Kishore MINGW64 ~$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.17134.228], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 25.0.2)
[√] Android Studio (version 3.1)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected devices (1 available)
• No issues found!
Here is how i solved this problem:
First, I renamed AndroidSDK\tools to AndroidSDK\tool.
Then, I set the windows' environment variable Path from AndroidSDK\tools to AndroidSDK\tool (maybe not necessary)
Run sdkmanager --update in tool\bin .
Ignore the warning and wait until the update is done.
There will be a new folder named tools in AndroidSDK.
Copy all the files in tools folder and paste them to tool folder.
Overlay all the files that which has the same name in tool folder.
Finally,delete tools folder and rename tool to tools.
Problem solved.