0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Could not create an instance of Tooling API implementation using the specified Gradle distribution

Last updated at Posted at 2021-01-15

事象 : Could not determine java version from '11'.

  • 環境
    • Windows10 Pro バージョン1909
    • Eclipse IDE for Enterprise Java Developers Version: 2020-09 (4.17.0)
  1. Gradleのプロジェクトをインポートして
  2. [Preferences] > [Java]でJava11から以下に変更した
    • [Compiler] > [Compier compliance level] > 1.8
    • [Installed JREs] > 1.8
  3. [Preferences] > [Gradle] > [Java home] > Java1.8の場所
  4. [Project Explorer] > プロジェクトを選択して右クリック > [Gradle] > [Refresh Gradle Project]
  5. が、エラーが消えない・・・
Problemsのエラー
Could not create an instance of Tooling API implementation using the specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.3-bin.zip'.
Could not determine java version from '11'.
gradle-wrapper.properties
...省略...
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip

原因 : Eclipseの起動用JVMのバージョンがGradleとあっていないから

いろいろ苦戦したことをまとめてみて推測した・・・まさか・・・なぜ起動用JVMが関係あるんだ・・・

結果 eclipse eclipse.ini
で指定するVM
[Preferences]の
[Installed JREs]と
[Compier compliance level]
[Preferences]の
[Gradle]の
[Java home]
環境変数の
JAVA_HOME
x 2020-09 Java11 Java11 未指定 Java11
x 2020-09 Java11 Java1.8 Java1.8 Java1.8
o 2019-09 未指定 Java1.8 Java1.8 Java1.8
x 2019-09 未指定 Java1.8 Java1.8 Java11
o 2019-09 Java1.8 Java1.8 Java1.8 Java11

対応 : Eclipseのバージョンを下げてeclipse.iniに-vmを設定する

Eclipse2020-09は起動用JVMにJava11以降が必要となるので、Eclipse2019-09に変える

  1. Eclipse 2019-09をインストールする
  2. eclipse.iniの-vmにJava8を設定する(JAVA_HOMEをJava8以外にしたとき用)
  3. [Preferences]で以下をすべてJava8に設定する
    • [Java] > [Installed JREs]
    • [Java] > [Compier] > [Compier compliance level]
    • [Gradle] > [Java home]
  4. 再びプロジェクトをインポートする
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?