I have installed Android studio v4.0.1 on my MAC.
When i try to create a new project in android studio via File->New->NewProject->BasicActivity I couldn't find dart in language option for new project. Basically, I am trying to create a new dart project.
Below is the doctor output: Under Android studio, flutter and dart seems to be ticked and ok.
mboobesh$ flutter doctor -v
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.14.6 18G6020, locale en-IN)
• Flutter version 1.17.5 at /Users/mboobesh/Documents/Dev/flutter
• Framework revision 8af6b2f038 (5 weeks 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.1)
• Android SDK at /Users/mboobesh/Library/Android/sdk
• Platform android-30, build-tools 30.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[!] IntelliJ IDEA Community Edition (version 2020.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
:~
Moreover, if i go to android studio preferences, there i could see Dart and its SDK path. Plugins are showing that Flutter and Dart are installed and up to date.
Additionally, I have installed intelliJ separately in my Mac, where i could see Dart in new project selection. Am i missing something to install in Android studio? that is why it is not showing Dart language in new project settings? please help.
just add Flutter to your androidStudio plugin go to :
Start Android Studio.
Open plugin preferences " preference->plugin " (Configure > Plugins as of v3.6.3.0 or later).
Select the Flutter plugin and click Install.
Click Yes when prompted to install the Dart plugin.
Click Restart when prompted.
that's all !
You are trying to create Flutter project as I understand.There is no Dart project. There is Flutter project which uses dart language. You need to install flutter plug-in on android studio. and there will be create new flutter project option.
This is from where you are creating flutter project:
If this option is not there that means you have not installed flutter plugin on android studio.
https://flutter.dev/docs/get-started/editor Check this out if there is not this option.
Related
When I am trying to add new dependency (packages) using flutter pub get in my flutter project i am getting This is taking an unexpectedly long time message.
All other commends working fine like flutter run, flutter doctor etc. Only for flutter pub get i am facing this issue. That's why i am unable to add new dependency (packages) in my flutter app.
Result of flutter doctor -v
[✓] Flutter (Channel stable, v1.17.0, on Linux, locale en_IN)
• Flutter version 1.17.0 at /home/suhask/private_work/Flutter/SDK/flutter_linux_1.17.0-stable/flutter
• Framework revision e6b34c2b5c (9 days ago), 2020-05-02 11:39:18 -0700
• Engine revision 540786dd51
• Dart version 2.8.1
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /home/suhask/Android/Sdk
• Platform android-28, build-tools 28.0.3
• Java binary at: /home/suhask/install_soft/android-studio-ide-183.5522156-linux/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
• All Android licenses accepted.
[✓] Android Studio (version 3.4)
• Android Studio at /home/suhask/install_soft/android-studio-ide-183.5522156-linux/android-studio
• Flutter plugin version 39.0.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)
• No issues found!
If anyone know how to solve this problem please help.
If you are working on Windows OS,
Close Android Studio
End process related to Flutter & Android Studio IDE from Task Manager.
Then, delete everything from Temp folder (run %temp% to open it directly).
Now, Open Android Studio and your Flutter project.
Run flutter pub get, it will work now.
Use flutter pub get --verbose to get more info.
I had the same problem, i did the next
uninstall the android studio, i installed the 4.0.1 version
Also I deleted the flutter sdk and download again in the page official
flutter
Finally i executed the command 'flutter doctor'
[√] Flutter (Channel stable, 1.20.2, on Microsoft Windows [Versión
10.0.18363.1016], locale es-ES)
[√] Android toolchain - develop for Android devices (Android SDK
version 29.0.3) [!] Android Studio (version 4.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality. [!] IntelliJ IDEA Community Edition (version 2019.3)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality. [!] VS Code (version 1.48.1)
X Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected device
! No devices available
! Doctor found issues in 4 categories.
it permits to create a success project
Before anyone points me to this link I would like to mention, that I don't think these are directly related.
As one can see my flutter doctor -v command is error free:
➜ flutter git:(stable) flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale en-US)
• Flutter version 1.12.13+hotfix.9 at /Users/johannes/.flutter-cli/flutter
• Framework revision f139b11009 (5 weeks ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/johannes/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
Yet I to have the issue of a grayed out emulator device with the message Device not applicable for the “main.dart” configuration like this:
I can now only start the emulator using the dropdown menu <no device> like this:
Interestingly I am then actually able to run my app on the device, while the device is still grayed out:
Flutters hot-reloading feature seems to not work properly though.
I have already added the main folder to the project as suggested here and I also made sure to change NO SDK to ANDROID API PLATFORM as suggested in the same link. All dependencies in Project Structure > Modules are found by Android Studio. I cloned the Flutter SKD from the stable branch on GitHub.
Does anyone have an idea why my setup is behaving this way?
Close Android Studio and Run again as Administrator
It solved my problem:
1- Make sure Flutter plugin is installed in android studio, you can install the plugin from file > setting > plugin
2- choose flutter SDK path from File > setting> Language & Framework > flutter.
I have the same issue before.
Uninstall Flutter and Dart plugin from Android Studio then reinstall Flutter (Dart will be installed automatically)
Remove created emulators from AVD Manager and create new one
Try making new project, and set SDK version same as emulators API version or lower from File > Project Structure...
Hopefully worked for you.
I have already installed Flutter and Dart plugins in Android Studio. I go through all the stages of creating a Flutter project but when I click on Finish I get the dialog "creating a new flutter project" but after a few seconds the welcome screen keeps showing up and I'm back at square one. Can anyone help, please?
Here's the information of "flutter doctor -v" command:
CreateProcessW failed 87
[!] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.418], locale en-US)
• Flutter version 1.12.13+hotfix.8 at C:\src\flutter
• Framework revision 0b8abb4724 (4 weeks ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0
X Downloaded executables cannot execute on host.
See https://github.com/flutter/flutter/issues/6207 for more information
[X] Android toolchain - develop for Android devices
X 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/setup/#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
It seems that you have a problem with Flutter installation. You can try to reinstall it (make sure you get version for your OS).
The second problem is with Android SDK. Installing Android Studio is not enough. Try going through this setup instructions: https://flutter.dev/docs/get-started/install#android-setup.
Considering that I had followed all this steps https://flutter.dev/docs/get-started/install/linux in my Ubuntu 18.04LTS, why this following problem continues to appear:
$ flutter doctor -v
[✓] Flutter (Channel stable, v1.7.8+hotfix.2, on Linux, locale en_US.UTF-8)
• Flutter version 1.7.8+hotfix.2 at /opt/flutter
• Framework revision 2e540931f7 (2 weeks ago), 2019-07-02 09:31:07 -0700
• Engine revision b1cb0d9e9b
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /home/rodrigo/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /home/rodrigo/Android/Sdk
• Java binary at: /usr/share/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b16-5323222)
• All Android licenses accepted.
[✓] Android Studio (version 3.4)
• Android Studio at /usr/share/android-studio
• Flutter plugin version 37.1.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b16-5323222)
[!] Android Studio
• Android Studio at /opt/android-studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b16-5323222)
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API
29) (emulator)
! Doctor found issues in 1 category.
Different from another similar questions here in StackOverflow, before I've installed flutter plugin the "[✓] Android Studio (version 3.4)" was equal to "[!] Android Studio", with same error messages. After I've installed flutter plugin (and dart), only "[!] Android Studio" still displaying the error.
Does someone know why? I've made many searches in my files, I have only one Android Studio installed. Why displays two? What "[!] Android Studio" refer to? Does command "$ flutter doctor" have a problem?
This post is for those who have gotten the plug-ins installed but still receive the warning.
Note: The Flutter team has created an issue for the inability of doctor to detect installed plug-ins. It's a know issue and they are looking to deprecate this detection feature of doctor:
https://github.com/flutter/flutter/issues/61246
My flutter and dart plug-ins are correctly installed but I still get the warning.
[!] Android Studio (version 4.0)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
In my case ignoring the warning worked fine.
I tried re-installing plug-ins several times but that did not remove the warning from flutter doctor.
However, everything works fine. I can successfully create and run apps created from
the command line with flutter create
from Android Studio with File->New->New Flutter Project
I'm on Ubuntu 20.04 LTS and Android Studio 4.0.1 (installed through JetBrains toolbox)
I installed flutter via the snap store:
sudo snap install flutter --classic
sudo snap install flutter-gallery
flutter channel dev
flutter upgrade
flutter config --enable-linux-desktop
# wanted to try web, apparently requires beta channel
flutter channel beta
flutter channel upgrade
flutter config --enable-web
FYI, it took me a while to understand where the Flutter SDK was located. It is here: /home/(username)/snap/flutter/common/flutter
Plugins installed correctly, but still get warning:
This can be solved in simple steps:
Step 1: Open Android Studio
Step 2: Open Android Studio Preferences
Step 3: Go-to Plugins tab
Step 4: Click on MarketPlace tab
Step 5: Search for flutter in search box
You will see a list of plugins related to flutter. Click on the first one and check which version it is. Currently, the latest version is 37.1.1.
Step 6: Click on install. (It may ask you to install dart plugin also. Hit yes and android studio will install dart and flutter for you)
Ready to rock !
I recently encountered this problem, I first tried to update the flutter and dart plugin from the android studio market place, but that did not work
Finally, I run the following command and it worked like a charm
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
Note: I'm on Mac OS running android studio 4.1
on running flutter doctor i get the below dependency lacking :
Android toolchain - develop for Android devices (Android SDK 28.0.3)
Could not determine java version
Android Studio (not installed)
But i have already installed both and developing apps on Android Studio.Then why flutter is not able to find these two?
It is complaining for the jre version as well.But internally Android Studio uses the jre which is already installed with it.
flutter doctor -v gives below output :
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.13.6 17G65, locale en-IN)
• Flutter version 1.0.0 at /Users/<myusername>/Downloads/development/flutter
• Framework revision 5391447fae (3 months ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/<myusername>/Library/Android/sdk
• Android NDK at /Users/<myusername>/Library/Android/sdk/ndk-bundle
• Platform android-28, build-tools 28.0.3
• Java binary at: /usr/bin/java
✗ Could not determine java version
[!] iOS toolchain - develop for iOS devices
✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
• ios-deploy 1.9.4
• CocoaPods version 1.6.0
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[!] Connected device
! No devices available
Solution for Xcode:
Install Xcode (get it from https://developer.apple.com/xcode/)
Ensure Xcode app is in the /Applications directory (NOT /Users/{user}/Applications).
Point xcode-select to the Xcode app Developer directory using the following command:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Note: Make sure your Xcode app path is correct.
Xcode: /Applications/Xcode.app/Contents/Developer
Xcode-beta: /Applications/Xcode-beta.app/Contents/Developer