I have tried to download flutter in Ubuntu, i encountered error after running flutter doctor.
[✗] 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-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use
flutter config --android-sdk to update to that location.
I want to download flutter in Ubuntu but I'm getting error with android sdk
sudo apt-get install
clang cmake git
ninja-build pkg-config
libgtk-3-dev liblzma-dev
libstdc++-12-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libstdc++-12-dev
E: Couldn't find any package by regex 'libstdc++-12-dev'
You can download Android Studio from here: https://developer.android.com/studio. Follow the installation instructions provided on the site.
Run the following command to set the SDK path: flutter config --android-sdk <path-to-your-sdk>
Note- Replace with the actual path where the Android SDK is installed.
First, update the package list to ensure you have the latest information about available packages: sudo apt-get update
The libstdc++-12-dev package might not be available on older Ubuntu versions. Instead, install the libstdc++-10-dev package, which should be available and is compatible with most setups: sudo apt-get install libstdc++-10-dev
Ensure that you have all other required dependencies installed by running: sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev
After completing the above steps, run flutter doctor again to check if the issues have been resolved: flutter doctor