Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter doesn't find plugins if Android Studio config path is changed #37670

Closed
cremor opened this issue Aug 6, 2019 · 14 comments
Closed

Flutter doesn't find plugins if Android Studio config path is changed #37670

cremor opened this issue Aug 6, 2019 · 14 comments
Labels
r: solved Issue is closed as solved t: flutter doctor Problem related to the "flutter doctor" tool tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@cremor
Copy link

cremor commented Aug 6, 2019

Steps to Reproduce

  1. Install Android Studio, the Android SDK, the Flutter plugin and the Flutter SDK. Choose a custom path for the Android SDK installation and set ANDROID_HOME. Run flutter doctor. Everything is fine:
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.17763.615], locale de-AT)
    • Flutter version 1.7.8+hotfix.4 at C:\Android\flutter
    • Framework revision 20e59316b8 (3 weeks ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at C:\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • ANDROID_HOME = C:\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 38.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.
  1. Modify C:\Program Files\Android\Android Studio\bin\idea.properties so that idea.config.path and idea.system.path point to custom paths.
  2. Move the existing folder C:\Users\Username\.AndroidStudio3.4 to the new location as configured in step 2.
  3. Run flutter doctor. It doesn't find Android Studio (and the JDK) any more:
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.17763.615], locale de-AT)
    • Flutter version 1.7.8+hotfix.4 at C:\Android\flutter
    • Framework revision 20e59316b8 (3 weeks ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at C:\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • ANDROID_HOME = C:\Android\Sdk
    X No Java Development Kit (JDK) found; You must have the environment variable JAVA_HOME set and the java binary in
      your PATH. You can download the JDK from https://www.oracle.com/technetwork/java/javase/downloads/.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.
  1. Call flutter config --android-studio-dir "C:\Program Files\Android\Android Studio". (Note: This is actually the default dir, but it still changes the output!) Now flutter doctor does find Android Studio, but not the plugins:
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.17763.615], locale de-AT)
    • Flutter version 1.7.8+hotfix.4 at C:\Android\flutter
    • Framework revision 20e59316b8 (3 weeks ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at C:\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • ANDROID_HOME = C:\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[!] Android Studio
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • android-studio-dir = C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

Seems like Flutter expects the Android Studio config path (and therefore the plugins) to always be in the user folder? This should be changed so it honors the settings in the idea.properties config file.

@blasten blasten added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 6, 2019
@rj-hwang
Copy link

rj-hwang commented Nov 6, 2019

Same problem with me.

@jmagman jmagman added the t: flutter doctor Problem related to the "flutter doctor" tool label Jan 10, 2020
@zkmark
Copy link

zkmark commented Mar 10, 2020

Same problem with me.
Andoid studio 3.6 and flutter 1.12.13
This has not been solved after almost half a year?

@zkmark
Copy link

zkmark commented Mar 10, 2020

install java jdk 8
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html

Add path
licences

from step 1 to 12
https://www.360logica.com/blog/how-to-set-path-environmental-variable-for-sdk-in-windows/

run
flutter doctor --android-licenses

@androidgj
Copy link

Same problem with me.

@HaroldBeyer
Copy link

Same problem here 😞

@nicolaspernoud
Copy link

Same for me...

@androidgj
Copy link

Same problem with me.

I‘ve fixed the problem by update flutter version .

@worldsoon
Copy link

worldsoon commented Jan 22, 2021

我也是这个问题。我只找到了Mac的解决办法,没有windows的.
Same problem here,I only found the solution for Mac, no for windows.

@hammad-ali-shah
Copy link

I once tried with flutter config --android-studio-dir C:\Program Files\Android\Android Studio but unfortunately it does not work because of empty space which breaks the tree structure. Later I used the quotes("") like this: flutter config --android-studio-dir "C:\Program Files\Android\Android Studio". I hope it works for you as well!

@yukon-pasindujayanath
Copy link

I once tried with flutter config --android-studio-dir C:\Program Files\Android\Android Studio but unfortunately it does not work because of empty space which breaks the tree structure. Later I used the quotes("") like this: flutter config --android-studio-dir "C:\Program Files\Android\Android Studio". I hope it works for you as well!

That work perfectly! Thanks in advance.

@darshankawar
Copy link
Member

@cremor
Given the age of this issue, are you still experiencing this using latest version of AS and framework ?
A working solution seems to be given here #37670 (comment)

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 13, 2022
@cremor
Copy link
Author

cremor commented Sep 13, 2022

@darshankawar Sorry, I can't answer this because I haven't used Flutter since shortly after I created this issue.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 13, 2022
@darshankawar
Copy link
Member

Based on above comment and considering that a working solution is provided, #37670 (comment), I am going ahead and closing this as solved.
If anybody still seeing this issue using latest stable version and using Android Studio version, please open a new issue using template so that we can address it properly.
If anybody disagrees, write in comments and I'll reopen it.

@darshankawar darshankawar added the r: solved Issue is closed as solved label Oct 4, 2022
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: solved Issue is closed as solved t: flutter doctor Problem related to the "flutter doctor" tool tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests