Issue With Running Flutter App

2,622 views
Skip to first unread message

Abada Samuel

unread,
Jan 9, 2020, 1:24:45 AM1/9/20
to Flutter Development (flutter-dev)
Initially, the flutter app was running fine. After certain changes to code, the build always fails even though appears correct as code passes travis-ci and codemagic builds. I have reverted the code to its previous state, yet no changes. After shipping to github and a codemagic build, the codemagic build passes hence i was able to see the debug app. I still have no idea why the android studio build fails. I have even invalidated caches and restarted yet nothing. See error from the logs below: You can also view the attached screenshot.

Launching lib\main.dart on Infinix X559C in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > File 'com.android.builder.files.ZipCentralDirectory@5a8178f9' was deleted, but previous version not found in cache

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > File 'com.android.builder.files.ZipCentralDirectory@413af313' was deleted, but previous version not found in cache

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 21s
Finished with error: Gradle task assembleDebug failed with exit code 1

Capture.PNG

Abada Samuel

unread,
Jan 9, 2020, 5:10:12 AM1/9/20
to Flutter Development (flutter-dev)
I think restarting my PC should fix it although I have found a workaround. I cloned the GitHub repo in a fresh directory and ran the app in android studio. App works as expected.

Tanayut Unrean

unread,
Jan 17, 2020, 12:04:07 PM1/17/20
to Flutter Development (flutter-dev)
Hello, I am experiencing the same problem. How do you fix that?

เมื่อ วันพฤหัสบดีที่ 9 มกราคม ค.ศ. 2020 13 นาฬิกา 24 นาที 45 วินาที UTC+7, Abada Samuel เขียนว่า:

ABADA SAMUEL

unread,
Jan 17, 2020, 12:08:36 PM1/17/20
to Tanayut Unrean, Flutter Development (flutter-dev)
I think the issue was with android studio. I am not sure yet. Is your project on git? What I did was - I cloned the repo from GitHub in a separate directory and ran the app. It worked. I guess you could try to invalidate caches and restart android studio. You could also restart your PC.

--
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/b5c4de7a-f971-4557-9021-24ea34640563%40googlegroups.com.

ABADA SAMUEL

unread,
Jan 17, 2020, 12:09:57 PM1/17/20
to Tanayut Unrean, Flutter Development (flutter-dev)
Also, following the threads, it seems some people solved the issue/similar by flutter upgrade.

On Fri, Jan 17, 2020 at 9:04 AM Tanayut Unrean <tanayu...@gmail.com> wrote:

Tanayut Unrean

unread,
Jan 17, 2020, 12:12:08 PM1/17/20
to Flutter Development (flutter-dev)
Thank you very much. I will try 55+


เมื่อ วันพฤหัสบดีที่ 9 มกราคม ค.ศ. 2020 13 นาฬิกา 24 นาที 45 วินาที UTC+7, Abada Samuel เขียนว่า:
เริ่มแรกแอพพลิเคชั่นพลิ้วไหวนั้นทำงานได้ดี หลังจากการเปลี่ยนแปลงโค้ดบางอย่างบิลด์จะล้มเหลวเสมอแม้ว่าจะปรากฏว่าถูกต้องเมื่อโค้ดผ่าน travis-ci และ codemagic builds ฉันเปลี่ยนรหัสกลับเป็นสถานะก่อนหน้า แต่ยังไม่มีการเปลี่ยนแปลง หลังจากจัดส่งไปยัง github และ codemagic build แล้ว codemagic build จะผ่านดังนั้นฉันจึงสามารถดูแอป debug ได้ ฉันยังไม่รู้ว่าทำไม android studio build ล้มเหลว ฉันมีแคชที่ใช้งานไม่ได้และไม่ได้รีสตาร์ทเลย ดูข้อผิดพลาดจากบันทึกด้านล่าง: คุณสามารถดูภาพหน้าจอที่แนบมาได้

การเปิดใช้ lib \ main.dart บน Infinix X559C ในโหมดแก้ไขข้อบกพร่อง ...
กำลังรันภารกิจ Gradle 'assembleDebug' ...

ความล้มเหลว: สร้างเสร็จสมบูรณ์ด้วยความล้มเหลว 2 ครั้ง

1: งานล้มเหลวโดยมีข้อยกเว้น
-----------
* มีอะไรผิดปกติ:
การดำเนินการล้มเหลวสำหรับงาน ': แอป: mergeDebugJavaResource'
> เกิดความล้มเหลวขณะเรียกใช้งาน com.android.build.gradle internal.tasks.Workers $ ActionFacade
   > ไฟล์ 'com.android.builder.files ZipCentralDirectory @ 5a8178f9 'ถูกลบ แต่ไม่พบรุ่นก่อนหน้าในแคช

* ลอง:
รันด้วยตัวเลือก --stacktrace เพื่อรับการติดตามสแต็ก เรียกใช้ตัวเลือก --info หรือ --debug เพื่อรับเอาต์พุตบันทึกเพิ่มเติม ทำงานด้วย - สแกนเพื่อรับข้อมูลเชิงลึกเต็มรูปแบบ
==============================================================================

2: งานล้มเหลวโดยมีข้อยกเว้น
-----------
* มีอะไรผิดปกติ:
การดำเนินการล้มเหลวสำหรับงาน ': แอป: mergeDebugNativeLibs'
> เกิดความล้มเหลวขณะเรียกใช้งาน com.android.build.gradle internal.tasks.Workers $ ActionFacade
   > ไฟล์ 'com.android.builder.files ZipCentralDirectory @ 413af313 'ถูกลบ แต่ไม่พบรุ่นก่อนหน้าในแคช

* ลอง:
รันด้วยตัวเลือก --stacktrace เพื่อรับการติดตามสแต็ก เรียกใช้ตัวเลือก --info หรือ --debug เพื่อรับเอาต์พุตบันทึกเพิ่มเติม ทำงานด้วย - สแกนเพื่อรับข้อมูลเชิงลึกเต็มรูปแบบ
==============================================================================

* รับความช่วยเหลือเพิ่มเติมที่https://help.gradle.org

สร้างความล้มเหลวใน 21 วินาที
เสร็จสิ้นโดยมีข้อผิดพลาด: ภารกิจการรวบรวมข้อมูลประกอบล้มเหลวล้มเหลวด้วยรหัสออก 1

Reply all
Reply to author
Forward
0 new messages