Reputation: 24672
When I try to import a Gradle project into IntelliJ, I get:
Resolve Error
No such property: spredfastRepoUsername for class:
org.gradle.api.internal.artifacts.repositories.DefaultPasswordCredentials_Decorated
Consult IDE log for more details (Help | Show Log)
This is strange, because I do have spredfastRepoUsername
defined in ~/.gradle/gradle.properties
, as evidenced by a successful ./gradlew clean test
in bash.
Any idea why this might happen? My coworkers can import the project into their IntelliJ without issue.
Clicking on Show Log
does nothing.
System:
Upvotes: 0
Views: 4349
Reputation: 24672
The problem turned out to be bad settings. If you regularly export/import settings between different computers, IntelliJ can get confused about file paths, that should be relative to any user's home directory, but are actually absolute.
After resetting my IntelliJ settings, I was able to import the Gradle project.
If you want to safely backup/restore/sync your settings, it's best to do that with a plugin that respects home-relative file paths, such as https://github.com/develar/settings-repository
Update
The problem also turned about to be:
Ensure that IntelliJ's Gradle settings are configured to use <your home directory/.gradle
as the Service Directory, not the gradle bin home. :P
Upvotes: 1