Finished with error: Gradle task assembleDebug failed with exit code 1 , when i run main.dart for the first time

420 views
Skip to first unread message

husam alkdary

unread,
Apr 21, 2020, 11:31:52 AM4/21/20
to Flutter Development (flutter-dev)
I'm beginner in flutter I just create a new flutter project with intellij idea flutter plug in and I connect my device and then I run the main.dart file but I get this error
I hope from someone knew the issue help me to fix it
thanks in advance 

Launching lib\main.dart on SM G350E in debug mode...
Running Gradle task 'assembleDebug'...
Exception in thread "main" java.net.UnknownHostException: services.gradle.org
 at java
.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
 at java
.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
 at java
.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
 at java
.net.Socket.connect(Socket.java:589)
 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:1156)
 at sun
.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
 at sun
.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
 at sun
.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
 at sun
.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
 at sun
.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
 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)
Finished with error: Gradle task assembleDebug failed with exit code 1


 

Souvik Dutta

unread,
Apr 21, 2020, 11:39:01 AM4/21/20
to husam alkdary, Flutter Development (flutter-dev)
You need to keep your computer connected to the internet. This should solve the issue.

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/cdbcf926-1d61-45e5-a871-8a127c2384bc%40googlegroups.com.

Rajil Saj

unread,
Apr 21, 2020, 12:41:42 PM4/21/20
to Souvik Dutta, husam alkdary, Flutter Development (flutter-dev)

husam alkdary

unread,
Apr 21, 2020, 12:47:30 PM4/21/20
to Flutter Development (flutter-dev)

do you mean the I need to be online every time I run flutter app ?
To unsubscribe from this group and stop receiving emails from it, send an email to flutt...@googlegroups.com.

Souvik Dutta

unread,
Apr 21, 2020, 12:59:54 PM4/21/20
to husam alkdary, Flutter Development (flutter-dev)
No only the first time of the day. This is happening because of a plugin you might be using. 

Souvik flutter dev

To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/da339335-f5aa-4d66-a79c-40aa41e7c828%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages