web-dev-qa-db-ja.com

libgdxの新しいGradleプロジェクトのモデルを構築する際のエラー

EclipseにGradleをインストールし、libgdx Gradleプロジェクトをインポートしたいと考えています。しかし、「Build Model」ボタンをクリックすると、読み込みバーの約50%でエラーが発生します。ここに問題があります:

> Plug-in: org.springsource.ide.Eclipse.gradle.core Severity : error
> Message : org.Eclipse.osgi.internal.framework.EquinoxConfiguration$1
> Exception Stack trace : Java.lang.reflect.InvocationTargetException
>   at
> org.springsource.ide.Eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.Java:92)
>   at
> org.Eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.Java:122)
> Caused by: org.Eclipse.core.runtime.CoreException:
> org.Eclipse.osgi.internal.framework.EquinoxConfiguration$1    at
> org.springsource.ide.Eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.Java:284)
>   at
> org.springsource.ide.Eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.Java:633)
>   at
> org.springsource.ide.Eclipse.gradle.core.GradleProject.getSkeletalGradleModel(GradleProject.Java:654)
>   at
> org.springsource.ide.Eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(GradleImportWizardPageOne.Java:516)
>   at
> org.springsource.ide.Eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.Java:84)
>   ... 1 more Caused by: org.gradle.tooling.GradleConnectionException:
> Could not fetch model of type 'HierarchicalEclipseProject' using
> Gradle distribution
> 'http://services.gradle.org/distributions/gradle-1.11-all.Zip'.   at
> org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.Java:55)
>   at
> org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.Java:57)
>   at
> org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.Java:64)
>   at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>   at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>   at Java.lang.Thread.run(Unknown Source)     at
> org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.Java:46)
>   at
> org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.Java:48)
>   at
> org.springsource.ide.Eclipse.gradle.core.GradleModelProvider.buildModel(GradleModelProvider.Java:385)
>   at
> org.springsource.ide.Eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.Java:290)
>   ... 5 more Caused by:
> org.gradle.launcher.daemon.client.DaemonConnectionException: Could not
> dispatch a message to the daemon.     at
> org.gradle.launcher.daemon.client.DaemonClientConnection.dispatch(DaemonClientConnection.Java:57)
>   at
> org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.Java:168)
>   at
> org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.Java:151)
>   at
> org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.Java:74)
>   at
> org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.Java:42)
>   at
> org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.Java:29)
>   at
> org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.Java:53)
>   at
> org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.Java:30)
>   at
> org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.Java:106)
>   at
> org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.Java:93)
>   at
> org.gradle.tooling.internal.provider.DefaultConnection.getModel(DefaultConnection.Java:133)
>   at
> org.gradle.tooling.internal.consumer.connection.ModelBuilderBackedModelProducer.produceModel(ModelBuilderBackedModelProducer.Java:49)
>   at
> org.gradle.tooling.internal.consumer.connection.GradleBuildAdapterProducer.produceModel(GradleBuildAdapterProducer.Java:42)
>   at
> org.gradle.tooling.internal.consumer.connection.BuildInvocationsAdapterProducer.produceModel(BuildInvocationsAdapterProducer.Java:47)
>   at
> org.gradle.tooling.internal.consumer.connection.ModelBuilderBackedConsumerConnection.run(ModelBuilderBackedConsumerConnection.Java:55)
>   at
> org.gradle.tooling.internal.consumer.DefaultModelBuilder$1.run(DefaultModelBuilder.Java:59)
>   at
> org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.Java:82)
>   at
> org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.Java:58)
>   at
> org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(LoggingInitializerConsumerActionExecutor.Java:44)
>   at
> org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.Java:55)
>   at
> org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.Java:64)
>   at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>   at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>   at Java.lang.Thread.run(Unknown Source) Caused by:
> org.gradle.messaging.remote.internal.MessageIOException: Could not
> write message Build{id=67f4f73f-8d68-4e23-87c2-648a4fec30c8.1,
> currentDir=C:\applications\Eclipse} to '/127.0.0.1:1598'.     at
> org.gradle.messaging.remote.internal.inet.SocketConnection.dispatch(SocketConnection.Java:115)
>   at
> org.gradle.launcher.daemon.client.DaemonClientConnection.dispatch(DaemonClientConnection.Java:51)
>   ... 23 more Caused by: Java.io.NotSerializableException:
> org.Eclipse.osgi.internal.framework.EquinoxConfiguration$1    at
> Java.io.ObjectOutputStream.writeObject0(Unknown Source)   at
> Java.io.ObjectOutputStream.writeObject(Unknown Source)    at
> Java.util.HashMap.internalWriteEntries(Unknown Source)    at
> Java.util.HashMap.writeObject(Unknown Source)     at
> Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
> Sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)   at
> Sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)   at
> Java.lang.reflect.Method.invoke(Unknown Source)   at
> Java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)   at
> Java.io.ObjectOutputStream.writeSerialData(Unknown Source)    at
> Java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)    at
> Java.io.ObjectOutputStream.writeObject0(Unknown Source)   at
> Java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)     at
> Java.io.ObjectOutputStream.writeSerialData(Unknown Source)    at
> Java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)    at
> Java.io.ObjectOutputStream.writeObject0(Unknown Source)   at
> Java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)     at
> Java.io.ObjectOutputStream.writeSerialData(Unknown Source)    at
> Java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)    at
> Java.io.ObjectOutputStream.writeObject0(Unknown Source)   at
> Java.io.ObjectOutputStream.writeObject(Unknown Source)    at
> org.gradle.messaging.remote.internal.Message.send(Message.Java:40)    at
> org.gradle.messaging.remote.internal.DefaultMessageSerializer$MessageWriter.write(DefaultMessageSerializer.Java:62)
>   at
> org.gradle.messaging.remote.internal.inet.SocketConnection.dispatch(SocketConnection.Java:112)
>   ... 24 more Root exception: org.Eclipse.core.runtime.CoreException:
> org.Eclipse.osgi.internal.framework.EquinoxConfiguration$1    at
> org.springsource.ide.Eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.Java:284)
>   at
> org.springsource.ide.Eclipse.gradle.core.GradleProject.getGradleModel(GradleProject.Java:633)
>   at
> org.springsource.ide.Eclipse.gradle.core.GradleProject.getSkeletalGradleModel(GradleProject.Java:654)
>   at
> org.springsource.ide.Eclipse.gradle.ui.wizards.GradleImportWizardPageOne$11.doit(GradleImportWizardPageOne.Java:516)
>   at
> org.springsource.ide.Eclipse.gradle.core.util.GradleRunnable.run(GradleRunnable.Java:84)
>   at
> org.Eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.Java:122)
> Caused by: org.gradle.tooling.GradleConnectionException: Could not
> fetch model of type 'HierarchicalEclipseProject' using Gradle
> distribution
> 'http://services.gradle.org/distributions/gradle-1.11-all.Zip'.   at
> org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.Java:55)
>   at
> org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.Java:57)
>   at
> org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.Java:64)
>   at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>   at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>   at Java.lang.Thread.run(Unknown Source)     at
> org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.Java:46)
>   at
> org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.Java:48)
>   at
> org.springsource.ide.Eclipse.gradle.core.GradleModelProvider.buildModel(GradleModelProvider.Java:385)
>   at
> org.springsource.ide.Eclipse.gradle.core.GradleModelProvider$GroupedModelProvider.ensureModels(GradleModelProvider.Java:290)
>   ... 5 more Caused by:
> org.gradle.launcher.daemon.client.DaemonConnectionException: Could not
> dispatch a message to the daemon.     at
> org.gradle.launcher.daemon.client.DaemonClientConnection.dispatch(DaemonClientConnection.Java:57)
>   at
> org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.Java:168)
>   at
> org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.Java:151)
>   at
> org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.Java:74)
>   at
> org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.Java:42)
>   at
> org.gradle.tooling.internal.provider.DaemonBuildActionExecuter.execute(DaemonBuildActionExecuter.Java:29)
>   at
> org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.Java:53)
>   at
> org.gradle.tooling.internal.provider.LoggingBridgingBuildActionExecuter.execute(LoggingBridgingBuildActionExecuter.Java:30)
>   at
> org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.Java:106)
>   at
> org.gradle.tooling.internal.provider.ProviderConnection.run(ProviderConnection.Java:93)
>   at
> org.gradle.tooling.internal.provider.DefaultConnection.getModel(DefaultConnection.Java:133)
>   at
> org.gradle.tooling.internal.consumer.connection.ModelBuilderBackedModelProducer.produceModel(ModelBuilderBackedModelProducer.Java:49)
>   at
> org.gradle.tooling.internal.consumer.connection.GradleBuildAdapterProducer.produceModel(GradleBuildAdapterProducer.Java:42)
>   at
> org.gradle.tooling.internal.consumer.connection.BuildInvocationsAdapterProducer.produceModel(BuildInvocationsAdapterProducer.Java:47)
>   at
> org.gradle.tooling.internal.consumer.connection.ModelBuilderBackedConsumerConnection.run(ModelBuilderBackedConsumerConnection.Java:55)
>   at
> org.gradle.tooling.internal.consumer.DefaultModelBuilder$1.run(DefaultModelBuilder.Java:59)
>   at
> org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.Java:82)
>   at
> org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.Java:58)
>   at
> org.gradle.tooling.internal.consumer.connection.LoggingInitializerConsumerActionExecutor.run(LoggingInitializerConsumerActionExecutor.Java:44)
>   at
> org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.Java:55)
>   at
> org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.Java:64)
>   at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>   at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>   at Java.lang.Thread.run(Unknown Source) Caused by:
> org.gradle.messaging.remote.internal.MessageIOException: Could not
> write message Build{id=67f4f73f-8d68-4e23-87c2-648a4fec30c8.1,
> currentDir=C:\applications\Eclipse} to '/127.0.0.1:1598'.     at
> org.gradle.messaging.remote.internal.inet.SocketConnection.dispatch(SocketConnection.Java:115)
>   at
> org.gradle.launcher.daemon.client.DaemonClientConnection.dispatch(DaemonClientConnection.Java:51)
>   ... 23 more Caused by: Java.io.NotSerializableException:
> org.Eclipse.osgi.internal.framework.EquinoxConfiguration$1    at
> Java.io.ObjectOutputStream.writeObject0(Unknown Source)   at
> Java.io.ObjectOutputStream.writeObject(Unknown Source)    at
> Java.util.HashMap.internalWriteEntries(Unknown Source)    at
> Java.util.HashMap.writeObject(Unknown Source)     at
> Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   at
> Sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)   at
> Sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)   at
> Java.lang.reflect.Method.invoke(Unknown Source)   at
> Java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)   at
> Java.io.ObjectOutputStream.writeSerialData(Unknown Source)    at
> Java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)    at
> Java.io.ObjectOutputStream.writeObject0(Unknown Source)   at
> Java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)     at
> Java.io.ObjectOutputStream.writeSerialData(Unknown Source)    at
> Java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)    at
> Java.io.ObjectOutputStream.writeObject0(Unknown Source)   at
> Java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)     at
> Java.io.ObjectOutputStream.writeSerialData(Unknown Source)    at
> Java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)    at
> Java.io.ObjectOutputStream.writeObject0(Unknown Source)   at
> Java.io.ObjectOutputStream.writeObject(Unknown Source)    at
> org.gradle.messaging.remote.internal.Message.send(Message.Java:40)    at
> org.gradle.messaging.remote.internal.DefaultMessageSerializer$MessageWriter.write(DefaultMessageSerializer.Java:62)
>   at
> org.gradle.messaging.remote.internal.inet.SocketConnection.dispatch(SocketConnection.Java:112)
>   ... 24 more

セッションデータ:

Eclipse.buildId=4.4.1.M20140925-0400
Java.version=1.8.0_20
Java.vendor=Oracle Corporation
BootLoader constants: OS=win32, Arch=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.Eclipse.epp.package.Java.product
Command-line arguments:  -os win32 -ws win32 -Arch x86_64 -product org.Eclipse.epp.package.Java.product

助けていただければ幸いです

18
user3739850

次の説明と回避策については、Kris De Volderと 'Alex'の功績です。このアドレスで私が開いた問題についてコメントしました https://issuetracker.springsource.com/browse/STS-3922 andこの質問の完全な答えを提供するために、ほとんどここで直接引用されています:

「問題は、次のシステムプロパティから発生しています[...含まれているため]直列化できない値。プロパティは次のとおりです:

osgi.configuration.area.default
osgi.user.area.default
osgi.user.area

「回避策として、STS.ini、Eclipse.ini、またはGGTS.iniに-Dプロパティを追加して、これらのプロパティをEclipse 4.4.1で使用していた値に設定できます。

-Dosgi.configuration.area.default=null
-Dosgi.user.area.default=null
[email protected]

「この回避策は、次の3.6.2リリースのGradleツールにも追加されるため、gradleプラグインがインストールされると、これらのプロップが.iniファイルに自動的に追加されます。

「また、Gradleがこの問題に最後にパッチを適用したように見えるので、別の回避策としてGradle 2.2.BUILD-SNAPSHOTを使用していることにも言及する必要があります。ツールのGradle Preferenceページから、またはgradleプロジェクトのgradle.wrapperで設定して設定してください。 (s)」

だからあなたはそれを持っています!手動で、またはアップデートを介して適用できる簡単な修正。そして、それが機能することを確認できます。

34
Elias Vasylenko

STSインストールにsts.iniの代わりに/sts_installation_dir/configuration/config.iniがある場合は、現在の回答を特別に編集する方が簡単だと思いました。

プロパティの前に-Dを付けないため、config.iniを編集するための正しい形式は少し異なります。

それはそのようになります:

osgi.configuration.area.default=null
osgi.user.area.default=null
[email protected]
3
Ash

同じ問題が私にも起こりました、これが私が解決する方法です。まず、それは非常に簡単です。

[3つのステップに従ってください]
手順1:インターネットに接続して、ビルドモデルをクリックします。
ステップ2: Zipファイルのダウンロードを開始します。
ステップ3:その後、Eclipseを再起動します。

コーディングをお楽しみください... :)

0
Kavya Pari