Flutter Integration in android Studio issue - android-studio

While integrating Flutter in Android studio getting error as * Error running Gradle: Unable to download needed Android SDK components, as the following licenses have not been accepted: Android SDK Build-Tools 26.0.2, Android SDK Platform 27 To resolve this, please run the following command in a Terminal: flutter doctor --android-licenses

Problem was with sdk path in local.properties. By default its pointing to different location. It works for me when change android sdk home dir in sdk.dir

Related

Flutter SDK is incomplete during setting up Path in Android Studio Ubuntu 20.04 Flutter project creation

Hi have downloaded new version of Android Studio 4.1.1.
Installed Flutter and Dart plugin and also downloaded Flutter installation and unzipped into my specific location, but during the option to choose Flutter Path in Android studio, while I am creating Flutter project alwais get error:
the flutter sdk installation is incomplete please see https //flutter.dev/get-started
any same experience?
I think you downloaded the latest version which is not complete and you should download a version before the final version

Unable to locate android sdk Flutter Mac

I am a new user to flutter and i installed android studio and flutter plug in. While running my flutter doctor -v it shows. I don't know how to fix it. help me out. I tried a lot to fix it but nothing helps me
[✗] 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 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 3.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 34.0.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1248-b01)
[!] Android Studio
• Android Studio at /Users/apple/Developer/flutter/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
✗ Android Studio not found at /Users/apple/Developer/flutter/Contents
• Try updating or re-installing Android Studio.
[!] Connected device
! No devices available
Please go to Project Structure and solve some errors.
Android Studio -> File -> Project Structure.
Please check that you install dart and flutter plugin in the android studio.
Please install Dart in your system also.
is there local.properties file present in your project, inside android folder ?
if not , then create a local.properties file and put your android sdk path inside it, like in my case
sdk.dir=/Users/tusharpandey/Library/Android/sdk

How to upgrade to Android SDK Version 29.0.3?

I have spent over 5 hours following things from google, GitHub, and StackOverflow.
Still unable to upgrade the Android SDK Version to 29.0.3.
In flutter doctor, it shows the incomplete installation of Android SDK 29.0.3, but when I create a flutter project, it is automatically detecting the old version(28.0.3) and trying to install that, instead of a new version.
Here is the flutter doctor.
Flutter Doctor Command
Here is the flutter run command.
Flutter Run Command
These are Android SDK Manager details:
Android SDK Manager Details
Just to mention that I have deleted all folder files of 28.0.3 from the SDK folder, except the licenses file.
Please help.
Open project at android studio then follow this
Open 'SDK manager' and 'select android 10.0', and then press OK button
Find file android > app > build.gradle, and change compileSdkVersion, buildToolsVersion

Android Studio not showing Chrome as Flutter device

I got a small problem which accured after reinstalling Android Studio:
Android Studio
Android Studio is not showing Chrome as Device for my Flutter Web project, while flutter doctor shows clearly everything is enabled correctly:
Flutter doctor
I can normally run the flutter project on google chrome using the console or VS Code, but Android Studio does not work. I already checked the Flutter and Dart plugin.
I would be glad if someone who maybe had the same issue or knows how to fix this gets back to me!
Best Regards
Clearly it is not the issue with flutter. It is an issue with your Android Studio installation. You can verify the same by navigating to the your project folder in the terminal (or command prompt) and type
flutter run -d Chrome.
NOTE: The above command works only if you are on master, beta or dev branch and you have already enabled your flutter web support by typing
flutter config --enable-web
I noticed that your path to Android Studio as: C:\Program Files\Android\ Android Studio1
It means that during installation the original Android Studio folder is not deleted. A duplicate folder has been created in the same location. Hence the Android sdk location is must be changed as well.
You can solve this by:
Uninstall Android Studio. Delete the folder at the above location. Reinstall Android Studio. Update sdk path in your sdk manager as well as in your environment variable. (recommended).
Update the sdk folder in the sdk manager as well as your environment variables.

The command "flutter doctor" cannot locate Flutter and Dart plugins installed in Android Studio

I am new to the Flutter development environment. I downloaded the flutter and dart sdk and have added their path to the environment variable in the ~/.bashrc file. I am using Android studio for developing Flutter apps. I installed the Flutter and Dart plugins in Android Studio but when I am running the command flutter doctor it gives the following error:
Flutter and Dart Plugins installed in Android Studio
I have no idea why flutter doctor cannot detect the plugins installed for Android Studio.
Try to restart android studio after the installation of plugins, then run flutter doctor.
If it doesn't help, maybe the path of your android sdk is not set properly.
Get path of android sdk by going to Android Studio > Preferences and then find for sdk as shown in the picture. It should look like /Users/yourName/Library/Android/sdk
run the command flutter config --android-sdk PATH_TO_ANDROID_SDK in your terminal.
Once done, restart your machine and run flutter doctor.

Resources