libGDX项目设置错误

时间:2015-04-11 14:00:39

标签: java eclipse libgdx

我正在尝试创建一个libGDX项目,但我得到的只是错误,当我尝试导入项目时,即使我有错误,我也会收到更多错误和内容。

由于我无法发布图片,我将输入libGDX项目设置。

姓名:道奇

包装:com.fam.dodge

游戏类:道奇

目的地:C:\ Users \ adam-_000 \ Desktop \ Dodge \ Gradle文件夹

Android SDK:C:\ Users \ adam-_000 \ Documents \ Android SDK

libGDX版本:1.5.5版

子项目:桌面,Android,IOS

扩展程序:Freetype,Box2D

高级设置:生成Eclipse项目文件

基本上就是这样。这是我得到的错误消息:

线程中的异常" main" java.lang.RuntimeException:javax.net.ssl.SSLHandshakeException:java.security.cert.CertificateException:找不到匹配services.gradle.org的主题备用DNS名称。     在org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)     在org.gradle.wrapper.Install.createDist(Install.java:47)     在org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)     在org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) 引起:javax.net.ssl.SSLHandshakeException:java.security.cert.CertificateException:找不到与subject.gradle.org匹配的主题备用DNS名称。     在sun.security.ssl.Alerts.getSSLException(未知来源)     at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)     在sun.security.ssl.Handshaker.fatalSE(未知来源)     在sun.security.ssl.Handshaker.fatalSE(未知来源)     at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)     在sun.security.ssl.ClientHandshaker.processMessage(未知来源)     在sun.security.ssl.Handshaker.processLoop(未知来源)     在sun.security.ssl.Handshaker.process_record(未知来源)     at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)     at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)     在sun.security.ssl.SSLSocketImpl.startHandshake(未知来源)     在sun.security.ssl.SSLSocketImpl.startHandshake(未知来源)     在sun.net.www.protocol.https.HttpsClient.afterConnect(未知来源)     at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)     at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)     at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)     在org.gradle.wrapper.Download.downloadInternal(Download.java:59)     在org.gradle.wrapper.Download.download(Download.java:45)     在org.gradle.wrapper.Install $ 1.call(Install.java:60)     在org.gradle.wrapper.Install $ 1.call(Install.java:47)     在org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)     ......还有3个 引起:java.security.cert.CertificateException:找不到与subject.gradle.org匹配的主题备用DNS名称。     在sun.security.util.HostnameChecker.matchDNS(未知来源)     at sun.security.util.HostnameChecker.match(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkIdentity(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)     at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)     ......还有21个

感谢您的帮助! :)

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题。它在gradle中耿耿于怀。 (详情请http://www.mkyong.com/webservices/jax-ws/java-security-cert-certificateexception-no-name-matching-localhost-found/

但这是解决问题的简单方法。只需将https更改为$(ProjectDir)/gradle/wrapper/gradle-wrapper.properties中的http协议

更改行

distributionUrl = HTTPS://services.gradle.org/distributions/gradle-2.2-all.zip

distributionUrl = HTTP://services.gradle.org/distributions/gradle-2.2-all.zip