Error at building model of new Gradle project for libgdx

你离开我真会死。 提交于 2019-11-27 19:07:45

Credit to Kris De Volder and 'Alex' for the following explanation and work around, as commented on the issue I opened at this address https://issuetracker.springsource.com/browse/STS-3922 and mostly just directly quoted here to provide a complete answer for this question:

"The problem is coming from the following system properties [... as they contain] values that are not serializible. The properties are:

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

"As a workaround people can add -D properties to their STS.ini, eclipse.ini or GGTS.ini to set these properties to the values they used to have in Eclipse 4.4.1

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

"We are also adding this workaround to Gradle tooling in upcoming 3.6.2 release so that when the gradle plugins are installed these props will be added to the .ini file automatically.

"Also worth mentioning that Gradle seems to have patched this problem on their end as well so another workaround is using Gradle 2.2.BUILD-SNAPSHOT. Set it via Gradle Preference page in the tooling or by setting in the gradle.wrapper in your gradle project(s)."

So there you have it! A simple fix which you can either apply manually yourself, or through an update. And I can confirm that it works.

Ash

I thought it' easier to edit the current answer specially when STS installation has /sts_installation_dir/configuration/config.ini instead off sts.ini.

The correct format to edit config.ini is little different since you do NOT prefix properties with -D.

It would be:

osgi.configuration.area.default=null
osgi.user.area.default=null
osgi.user.area=@user.dir

Same problem happened with me,Here is how i resolve. first of all it's quite easy.

[Follow 3 steps]
step 1: just connect to the internet and then click on build model.
step 2: It will start downloading a zip file.
step 3: After that restart eclipse.

enjoy coding... :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!