0

running my first flutter application on my physical device , No issues found by flutter doctor , error shown by compiler :

dellpc@dell-pc:~/AndroidStudioProjects/flutter_app$ flutter run

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

Is the error anyway related to Internet , since Internet connection was not enabled during the run ?

Cshitiz Dhingra
  • 155
  • 1
  • 11
  • Update : After enabling internet connection i was able to succefully run the application – Cshitiz Dhingra Jun 10 '20 at 07:54
  • It's already answered here: https://stackoverflow.com/questions/54510465/finished-with-error-gradle-task-assembledebug-failed-with-exit-code-1 – sneha Jun 10 '20 at 08:24
  • As you have found the solution to your question, you can leave an answer below and mark it as the correct one. It will help others who face the same problem. – Fujia Jun 10 '20 at 08:26

0 Answers0