C:\Users\TomiwaPC>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, 2.1.0-12.1.pre, on Microsoft Windows [Version 10.0.18362.30], locale en-NG)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] Connected device (1 available)
• No issues found!
The android emulator is running fine but the flutter codes are not executed.
Under the android sdk
Android 10.0(Q)
I have
Android SDk Platform 29 installed
Sources for Android 29 installed
Android TV Intel x86 Atom System Image not installed
and others not installed
Could this be the problem
I am new to flutter and i am getting frustrated.
If you can provide your email so that i can send screenshot to you. I would be glad
Related
I have updated my Java version(java version "19.0.2" 2023-01-17) and when I run flutter doctor I get this error:
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-x64, locale es-AR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
[✓] Chrome - develop for the web
[!] Android Studio (version 2022.1)
✗ Unable to find bundled Java version.
[✓] VS Code (version 1.74.3)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
! Doctor found issues in 1 category.
I was having issues with the one provided by the system so I upgraded, but now I think Android Studio can't detect this new one.
Any thoughts?
This question already has answers here:
Unable to find bundled Java version on Flutter
(38 answers)
Closed 14 days ago.
flutter doctor -v fails due to missing Java:
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-arm, locale en-US)
• Flutter version 3.3.10 on channel stable at /opt/homebrew/Caskroom/flutter/3.3.10/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 135454af32 (4 weeks ago), 2022-12-15 07:36:55 -0800
• Engine revision 3316dd8728
• Dart version 2.18.6
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/hahnemann/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Library/Java/JavaVirtualMachines/temurin-19.jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment Temurin-19.0.1+10 (build 19.0.1+10)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] VS Code (version 1.74.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.48.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.1 22C65 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.87
[✓] HTTP Host Availability
• All required HTTP hosts are available
I have Java installed from Adoptium using Brew. I already tried flutter doctor --android-licenses and removed the obsolete version of Android SDK Tools:
What could be wrong?
Follow these steps:
Go to Applications folder and find Android Studio app
Right click on it and hit Show Package Contents
Navigate to Contents, then right click on "jbr"
Hit duplicate
Rename the duplicate folder to "jre"
Done!!
Apparently it's an open issue with Android Studio Electric Eel 2022.1.1 after I upgraded using Brew. The workaround is:
cd /Applications/Android\ Studio.app/Contents
ln -s jbr jre
On Linux Operating System do this
cd /opt/android-studio
then
ln -s jbr jre
For Windows you can try this:
Open a terminal with admin permissions (e.g. Press Win and type "cmd", "powershell" or "terminal", whatever you prefer, and press Ctrl+Shift+Enter)
Then type:
cd C:\Program Files\Android\Android Studio
mklink /D "jre" "jbr"
Hints
If you have installed Android Studio in a different directory change the path.
If there is a almost jre directory you can simply delete it with rmdir /s jre this was the case on my system after an update to Electric Eel (2022.1.1).
I used to work with Flutter v2.8 as much as I expected. because of the Firebase, I had to update flutter to v3 to get it to work.
After updating Flutter to v3, flutter said, "You have to get JDK version 11 or newer". I got confused why it was saying that because "flutter.dev" has mentioned the appropriate version of JDK for flutter is 8 so far!
I updated my JDK to 11 then, I got these weird errors that I've never had before! every time that I run or build an app it says something like the following pictures:
I created this project by using this command: flutter create projectName
Flutter doctor:
[✓] Flutter (Channel stable, 3.3.0, on Arch Linux 5.17.4-arch1-1, locale en_US.UTF-8)
• Flutter version 3.3.0 on channel stable at /home/john/Android/Flutter/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ffccd96b62 (10 days ago), 2022-08-29 17:28:57 -0700
• Engine revision 5e9e0e0aa8
• Dart version 2.10
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /home/john/Android/Android/android-sdk
• Platform android-33, build-tools 33.0.0
• ANDROID_HOME = /home/john/Android/Android/android-sdk
• Java binary at: /usr/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+10)
• All Android licenses accepted
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
• clang version 13.0.1
• cmake version 3.23.1
• ninja version 1.10.2
• pkg-config version 1.8.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
[✓] IntelliJ IDEA Community Edition (version 2021.3)
• IntelliJ at /usr/share/idea
• Flutter plugin version 70.0.3
• Dart plugin version 213.5744.122
[✓] Connected device (1 available)
• Linux (desktop) • linux • linux-x64 • Arch Linux 5.17.4-arch1-1
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 2 categories.
I've tried to delete ~/.gradle/cache all the time. but cannot produce an .apk app.
tried to downgrade flutter to version 2.8 but again still have the error.
for more information see this GitHub link
(I created this project by using this command: flutter create projectName)
Try to create a new flutter project and copy the files from the current project.
I'm using Ubuntu 18.04LTS, Android Studio v3.0.1, installed latest Android SDK API 30 & 29, Android SDK Build tools, Platform tools & Command-line tools(latest),downgraded to java jdk1.8, installed Dart plugin on VSCode, installed Dart and Flutter plugin on Android Studio, installed flutter using snap on terminal.
But when I run flutter doctor, i get this
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.0, on Linux, locale en_IN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Android Studio (version 3.0)
[!] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.44.0)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
It says the plugin not installed even after I installed it and restarted android studio as well.
When i run flutter doctor --android-licenses, i get all licenses and accept them by typing Y in the terminal and even after this when i run flutter doctor it still gives me same result.
There was an issue with Java 9 so downgraded JDK to 1.8 and yet issue isn't resolved.
run the following commands
$ export JAVA_HOME=`/usr/libexec/java_home -v 1.8*`
$ flutter doctor --android-licenses
while running my first app
This below is the error message when I got when I tried to run an app and even the default app that came with the flutter.
Exception in thread "main" java.net.UnknownHostException: services.gradle.org
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at sun.net.NetworkClient.doConnect(NetworkClient
Exception: Gradle task assemblebug failed with Exit code 1
What I tried:
Invalidate caches/restart
Try to connect a real device instead of emulator. Came with more errors.
Changed compilesdkversion from 28 -29 ( under the build.gradle) also targets diversion from 28-29
Confirmed the distributionurl under (gradle-wrapper.properties) is https=//services.gradle.org/distributions/gradle-5.6.2-all.zip
The flutter doctor result below.
C:\Users\TOPE>flutter doctor -v
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.17134.1], locale en-US)
• Flutter version 1.17.5 at C:\Users\TOPE\FLUTTER\flutter
• Framework revision 8af6b2f038 (7 days ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at C:\Users\TOPE\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Connected device (1 available)
• AOSP on IA Emulator • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
! Doctor found issues in 1 category.
saw a recommendation to similar issue on GitHub. Which says "This error indicates a failure to download the gradle version specified in your project's gradle wrapper. Try running again with a different/faster internet connection". As result I connected to the internet. First run. It brought out another nasty errors. Second time same error. After that the Android studio was shutting down when I reopen it shuts down at the preparing work space (i.e when am connected to the internet)