Android Studio Expectation:Gradle任务assembleDebug失败,退出代码为1

时间:2020-06-10 06:58:01

标签: android android-studio flutter gradle

在物理设备上运行我的第一个Flutter应用程序, 扑医生未发现任何问题, 编译器显示的错误:

dellpc @ dell-pc:〜/ AndroidStudioProjects / flutter_app $颤动运行

Launching lib/main.dart on RMX1971 in debug mode...
Exception in thread "main" java.net.UnknownHostException: services.gradle.org
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)   
        at java.net.Socket.connect(Socket.java:607)                     
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)      
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)  
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)  
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:58)
        at org.gradle.wrapper.Download.download(Download.java:44)       
        at org.gradle.wrapper.Install$1.call(Install.java:61)           
        at org.gradle.wrapper.Install$1.call(Install.java:48)           
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
        at org.gradle.wrapper.Install.createDist(Install.java:48)       
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        11.2s
Exception: Gradle task assembleDebug failed with exit code 1

该错误是否与Internet有关,因为在运行期间未启用Internet连接?

0 个答案:

没有答案