CC: Tweaked

CC: Tweaked

42M Downloads

Can not import gradle project in IntelliJ IDEA

luochen1990 opened this issue ยท 4 comments

commented

Got following message when trying to import project in IntelliJ IDEA

Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().

Useful information to include:

  • CC: Tweaked version: 0ffd5fc (latest master branch)
  • IDE version: IntelliJ IDEA 2019.3.4 x64
  • Detailed reproduction steps:
    1. git clone this repo
    2. open the repo directory inside IntelliJ IDEA
    3. wait for popup "Gradle projects need to be imported" and click "Import Changes"
    4. got the error message about "Could not create service ..."
    5. execute ./gradlew setupDecompWorkspace as README telled.
    6. reopen IntelliJ IDEA and retry to import, and still got the same error
commented

There is a gradle task for making the intellij idea project, have you tried running that?

commented

@Lupus590 Thank you, but I'm new to gradle and don't know how to run it, could you please tell me how?

commented

@luochen1990 Open the CC:T directory in a command prompt, and run the following:

> ./gradlew build
> ./gradlew idea

I'm afraid I've not seen this problem before - fairly sure I'm using the same IDEA version and not hit issues, so this is very much a process of "try something 'til it works :/".

Edit: If the above commands fail, it might be worth running ./gradlew --info --stacktrace build and posting the full log.

commented

If you are using git bash as your command line on windows then I would suggest that you use ./gradlew.bat instead of .gradlew or './gradlew.sh`. Note that this won't auto-complete but the bat file will run in git bash like any native bash script.