0

I'm setting up flutter in my laptop (Elementary OS), the case is I'm trying to be able develop flutter without Android Studio and using VSCode to make it lightweight, the step I did is installing flutter, download manually android-sdk, and move it to usr/lib/Android, install gradle, and openJDK8,

I did setting up Android Environtment, export ANDROID_HOME to usr/lib/Android, setting up with sdkmanager to download system-images, etc

I can run the flutter command on terminal, the problem is in the android-sdk path, I already changed the config with flutter config --android-sdk /usr/lib/Android, but, the flutter doctor -v command shows

[!] Android toolchain - develop for Android devices
    • Android SDK at /usr/lib/android-sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    ✗ 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.

and the flutter config command shows

Settings:
  android-sdk: /usr/lib/Android/
Willy
  • 29
  • 11

2 Answers2

2
  1. you can try this. flutter config --android-sdk < path-to-your-android-sdk-path>
  2. export ANDROID_SDK_ROOT="/Users/$USER/Library/Android/sdk" export ANDROID_HOME=$ANDROID_SDK_ROOT

HAPPY CODING :)

Sonu Saini
  • 1,814
  • 9
  • 16
  • I already try (1) as I describe in the question, and tried (2) and still not working – Willy Dec 18 '19 at 09:16
  • try again (2) it will helpful to you and check your android sdk location then add that path in ANDROID_HOME . – Sonu Saini Dec 18 '19 at 09:58
  • follow the below link -> https://stackoverflow.com/questions/26256279/how-to-set-android-home-path-in-ubuntu – Sonu Saini Dec 18 '19 at 10:01
  • thank you, it's work after try to following the link you provided, now I have another problem about gradle, thanks anyway! – Willy Dec 19 '19 at 02:09
0

You can add Android SDK to path variable.

Add ...\AndroidSDK\platform-tools to your path.

Crazy Lazy Cat
  • 13,595
  • 4
  • 30
  • 54