I am trying to import a Gradle project into IntelliJ, and when I get to the Gradle Home
textbox, it is not automatically populated, nor will typing in the path of Gradle Home
result in a valid location - I have the GRADLE_USER_HOME
environment variable set (to what I think is!) the correct path, and I have been able to successfully import this same project into Eclipse. Any suggestions?
相关问题
- Could not read entry … from cache taskArtifacts.bi
- Configure gradle plugin based on future tasks
- Configure gradle plugin based on future tasks
- How to fix the error Cannot change strategy of con
- How to make available “open this project in Intell
相关文章
- In IntelliJ IDEA, how can I create a key binding t
- Android BuildConfig Field generating String incorr
- IntelliJ IDEA can't open projects or add SDK o
- IntelliJ Subversion Authentication Required Dialog
- Gradle Could not find method “() for arguments on
- Gradle Custom Plugin: gradleApi() vs Explicit Depe
- Android Studio 3.5 ERROR: Unable to resolve depend
- How to specify @category in test task in gradle?
In case you are using Mac, most probably your gradle home should be
/usr/local/gradle-2.0
for example.In preference of IDEA search for gradle and set gradle home as given above. It should work
This is instruction for MAC only. I had the same problem. I solved it by configuring
$GRADLE_HOME
in.bash_profile
. Here's how you do it:.bash_profile
(usually it's located in the user’s home directory).$PATH
variable:export GRADLE_HOME=/usr/local/opt/gradle/libexec export PATH=$GRADLE_HOME/bin:$PATH
source .bash_profile
I wrote my own article with instruction in a case if somebody will encounter the same problem.
If you are using IntelliJ, just do the following.
That's all.
If you're using MacPorts, the path is
Click New -> Project from existing sources -> Import gradle project...
Then Idea recognized gradle automatically.
Installed on a Mac via Homebrew, the path
is preferable to
since the former will survive version upgrades.