gradle-doctor
gradle-doctor copied to clipboard
Request: add more precise explanation of various fixes
I've found the next ones not specific enough:
- Doesn't say about Windows OS how to set JAVA_HOME (can be done via command line too, but would be nice to have both UI-based and command-line instructions), even though it's running on it:
A problem occurred configuring root project 'My Application'.
> =============================== Gradle Doctor Prescriptions ============================================
| JAVA_HOME is not set.
|
| Please set JAVA_HOME so that switching between Android Studio and the terminal does not trigger a fu |
| ll rebuild.
|
| To set JAVA_HOME: (using bash)
|
| echo "export JAVA_HOME=$(/usr/libexec/java_home)" >> ~/.bash_profile
|
| or `~/.zshrc` if using zsh.
|
| |
========================================================================================================
- It doesn't say in which file to add "UseParallelGC" :
A problem occurred configuring root project 'My Application'.
> =============================== Gradle Doctor Prescriptions ============================================
| For faster builds, use the parallel GC. |
| Add -XX:+UseParallelGC to the org.gradle.jvmargs |
========================================================================================================
- Doesn't say where to add "doctor" exactly:
=============================== Gradle Doctor Prescriptions ============================================
| Jetifier was enabled which means your builds are slower by 4-20%. |
| Here's an article to help you disable it: |
| https://adambennett.dev/2020/08/disabling-jetifier/ |
| |
| To disable this warning, configure the Gradle Doctor extension: |
| doctor { |
| warnWhenJetifierEnable.set(false) |
| } |
========================================================================================================
Hey, thanks for filing this. These look like good improvements to our documentation as well as the Gradle Doctor itself. Please feel free to suggest and make changes with impoved wording.
@runningcode Hello, is it possible for some of those to actually have a quick-fix instead of just text? I also wonder about the suggestion of it to use JDK of the OS itself. I think it causes some issues which means it might not be a good tip. Today I got this issue and only going back to what the IDE has fixed it: https://stackoverflow.com/q/37015872/878126
Quick fixes sound great. Can you explain how you would like those to work? I'm also very open to PRs and improvements in this area.
I'm unfamiliar with that error. What version of Java were you trying? I think the newest fully supported version in Android Studio is JDK 11.
I don't think using JDK 11 is a good idea for Android Studio. I think it caused me some issues and I had to set it back.
As for the rest, sorry I don't know.
Thanks. Please file bugs or reference them for any issues you encounter regarding JDK 11! JDK 11 will be the default JDK in Android Studio 4.2 (or 7 depending on how the version is named).