Gradle task assembledebug failed with exit code 1

3,131 views
Skip to first unread message

Souvik Dutta

unread,
Mar 14, 2020, 2:38:20 AM3/14/20
to Flutter Development (flutter-dev)
I am running this code https://flutter.dev/docs/get-started/codelab
Exactly as it is but cannot get it to run. I get the same error saying "gradle task assembledebug failed". I am using an android nougat 7.1 emulator on an amd processor. The emulator runs fine but I get the error. Please help. Thank you.

ABADA SAMUEL

unread,
Mar 14, 2020, 9:40:05 AM3/14/20
to Souvik Dutta, Flutter Development (flutter-dev)
Please drop the full logs of the terminal so we can know what we are dealing with

On Fri, Mar 13, 2020 at 11:38 PM Souvik Dutta <souvik...@gmail.com> wrote:
I am running this code https://flutter.dev/docs/get-started/codelab
Exactly as it is but cannot get it to run. I get the same error saying "gradle task assembledebug failed". I am using an android nougat 7.1 emulator on an amd processor. The emulator runs fine but I get the error. Please help. Thank you.

--
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/e313248c-b026-4cbd-bffd-6d70c8d272a9%40googlegroups.com.

Souvik Dutta

unread,
Mar 14, 2020, 10:34:48 AM3/14/20
to ABADA SAMUEL, Flutter Development (flutter-dev)
I just solved my problem by just having my computer connected to the internet. I don't know how or what happened but the app is running smoothly. Thanks.

ABADA SAMUEL

unread,
Mar 14, 2020, 10:42:57 AM3/14/20
to Souvik Dutta, Flutter Development (flutter-dev)
Glad to hear it!  That's correct. A couple of Gradle issues are fixed by connecting to the internet and building again. Though, its not all the time.

Souvik Dutta

unread,
Mar 14, 2020, 10:47:26 AM3/14/20
to ABADA SAMUEL, Flutter Development (flutter-dev)
Why does this happen? I mean does it download any missing files?

ABADA SAMUEL

unread,
Mar 14, 2020, 11:00:35 AM3/14/20
to Souvik Dutta, Flutter Development (flutter-dev)
Well, yes and no. If you look at the logs when the build failed, you might see that some files were not downloaded. They are not heavy files though. Ofen times, I start my project offline using android studio. Though I develop while connected to the internet hence I don't get issues as yours frequently but yes, I have encountered a similar issue.

Gradle issues with flutter are not as severe as that of native android(java and kotlin) {from my own experience, although I may be wrong}. For every failed build, one should check the error logs to have an idea of what went wrong.

Failed builds could be a result of many things - certain files need to be downloaded, androidX incompatibility in a certain plugin... One just have to check the logs to be sure what went wrong.
Reply all
Reply to author
Forward
0 new messages