gpt4 book ai didi

eclipse - 为 libgdx 构建新 Gradle 项目模型时出错

转载 作者:行者123 更新时间:2023-12-02 04:23:30 24 4
gpt4 key购买 nike

我在 eclipse 中安装了 Gradle 并想要导入 libgdx Gradle 项目。但是,当我单击“构建模型”按钮时,加载栏大约 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

session 数据:

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

任何帮助将不胜感激

最佳答案

感谢 Kris De Volder 和“Alex”提供了以下解释和解决方法,正如我在该地址 https://issuetracker.springsource.com/browse/STS-3922 中打开的问题中所评论的那样大多数情况下直接引用这里来提供这个问题的完整答案:

“问题来自以下系统属性[...因为它们包含]不可序列化的值。这些属性是:

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

“作为一种解决方法,人们可以将 -D 属性添加到其 STS.ini、eclipse.ini 或 GGTS.ini,以将这些属性设置为他们在 Eclipse 4.4.1 中使用的值

-Dosgi.configuration.area.default=null
-Dosgi.user.area.default=null
-Dosgi.user.area=@user.dir

“我们还在即将发布的 3.6.2 版本中将此解决方法添加到 Gradle 工具中,以便在安装 gradle 插件时,这些 Prop 将自动添加到 .ini 文件中。

“还值得一提的是,Gradle 似乎也修复了这个问题,因此另一种解决方法是使用 Gradle 2.2.BUILD-SNAPSHOT。通过工具中的 Gradle Preference 页面或通过在 gradle.wrapper 中进行设置来设置它你的 gradle 项目。”

所以你已经得到它了!一个简单的修复,您可以自己手动应用,也可以通过更新应用。我可以确认它有效。

关于eclipse - 为 libgdx 构建新 Gradle 项目模型时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26085045/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com