日期:2019.2.17
博客期:034
星期日
我先配置了Android的相关环境,先试着做了Hello World的测试,但是却出现了很严重的问题,问题如下:
1 Unable to get current time from Google's servers 2 3 java.net.ConnectException: Connection timed out: connect 4 at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) 5 at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 6 at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 7 at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 8 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) 9 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 10 at java.net.Socket.connect(Socket.java:589) 11 at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673) 12 at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) 13 at sun.net.NetworkClient.doConnect(NetworkClient.java:180) 14 at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) 15 at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) 16 at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) 17 at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) 18 at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) 19 at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138) 20 at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032) 21 at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) 22 at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153) 23 at com.android.tools.analytics.WebServerDateProvider.readDateHeaderWithHeadRequest(WebServerDateProvider.kt:52) 24 at com.android.tools.analytics.WebServerDateProvider.updateServerTimestampWithHeadRequest(WebServerDateProvider.kt:57) 25 at com.android.tools.analytics.WebServerDateProvider.<init>(WebServerDateProvider.kt:41) 26 at com.android.tools.analytics.AnalyticsSettings$initialize$2.run(AnalyticsSettings.kt:215) 27 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 28 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 29 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 30 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 31 at java.lang.Thread.run(Thread.java:745)
我也不知道是出错在哪里了,我反正是问了百度,问了学长,都没解决,目前彻底没辙了,等问题解决后,我会在评论里说明或者在今后的目录里解释。