Skip to content

Gradle build fails after engine update #8607

Closed

Description

@rbishop-bah

Steps to Reproduce

Running on flutter from 3 days ago app worked. After a flutter upgrade this morning (3/7) the app won't run. Running from Android Studio.

Logs

03-07 07:26:15.675 12331-12331/com.askllc.vinteresting E/ApkAssets: Error while loading asset assets/icudtl.dat: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
03-07 07:26:15.698 12331-12331/com.askllc.vinteresting I/Adreno: QUALCOMM build                   : e781517, I9267f384df
                                                                 Build Date                       : 10/26/16
                                                                 OpenGL ES Shader Compiler Version: XE031.09.00.03
                                                                 Local Branch                     : 
                                                                 Remote Branch                    : refs/tags/AU_LINUX_ANDROID_LA.UM.5.5.R1.07.00.00.269.009
                                                                 Remote Branch                    : NONE
                                                                 Reconstruct Branch               : NOTHING
03-07 07:26:15.802 12331-12375/com.askllc.vinteresting E/flutter: [ERROR:../../lib/tonic/logging/dart_error.cc(16)] Wrong script snapshot version, expected '795c4aba89b54b4c51894de889493cdf' found '850b51cd3b18a02dc9f31c0b233f3fe3'
03-07 07:26:15.832 12331-12375/com.askllc.vinteresting E/flutter: [ERROR:../../lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
                                                                  NoSuchMethodError: No top-level getter 'main' declared.
                                                                  Receiver: top-level
                                                                  Tried calling: main
                                                                  #0      NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:194)
                                                                  #1      _getMainClosure (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/natives.dart:55)
03-07 07:26:15.916 12331-12378/com.askllc.vinteresting D/libc: [NET] android_getaddrinfofornetcontext+,hn 9(0x3132372e302e30),sn(),hints(known),family 0,flags 1024, proc=com.askllc.vinteresting
03-07 07:26:15.922 12331-12378/com.askllc.vinteresting D/libc: [NET] android_getaddrinfofornetcontext+,hn 9(0x3132372e302e30),sn(),hints(known),family 0,flags 1024, proc=com.askllc.vinteresting
03-07 07:26:16.009 12331-12390/com.askllc.vinteresting I/flutter: Diagnostic server listening on http://127.0.0.1:35175/
03-07 07:26:16.020 12331-12390/com.askllc.vinteresting I/flutter: Observatory listening on http://127.0.0.1:33483/

Flutter Doctor

Paste the output of running flutter doctor here.

[√] Flutter (on Windows, channel master)
• Flutter at C:\dev\flutter
• Framework revision 24eeddc (10 hours ago),
• Engine revision f9c1f5f
• Tools Dart version 1.23.0-dev.2.0

[√] Android toolchain - develop for Android devices (Android SDK 25.0.2)
• Android SDK at C:\Users\Rob\AppData\Local\Android\sdk
• Platform android-25, build-tools 25.0.2
• Java(TM) SE Runtime Environment (build 1.8.0_121-b13)

[√] Android Studio (version 2.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Gradle version 3.2

[√] IntelliJ IDEA Community Edition (version 2016.3)
• Dart plugin version 163.13137
• Flutter plugin version 0.1.11.1

[√] Connected devices
• 2PS64 • HT69N0100346 • android-arm • Android 7.0 (API 24)

Activity

  1. goderbauer commented on Mar 7, 2017

    @goderbauer
    Member

    In the directory of your application, can you delete the build sub-directory inside the android directory and the build sub-directory inside android/app. Also, delete the app on your phone and try again? Does that work?

  2. rbishop-bah commented on Mar 7, 2017

    @rbishop-bah
    Author

    @goderbauer Yes that worked.

  3. goderbauer commented on Mar 7, 2017

    @goderbauer
    Member

    @jakobr-google Have you seen this before? Somehow, when the engine version is updated Gradle fails to either include the new sky_shell into the APK or fails to re-create the snapshot with the latest engine version causing this version miss-match on device:

    03-07 07:26:15.802 12331-12375/com.askllc.vinteresting E/flutter: [ERROR:../../lib/tonic/logging/dart_error.cc(16)] Wrong script snapshot version, expected '795c4aba89b54b4c51894de889493cdf' found '850b51cd3b18a02dc9f31c0b233f3fe3'
    

    The work around right now is to blow away the build artifacts of your app (see my previous comment) and force gradle to re-build everything.

  4. changed the title [-]App wont run (Win 10) after upgrade[/-] [+]Gradle build fails after engine update[/+] on Mar 7, 2017
  5. jakobr-google commented on Mar 10, 2017

    @jakobr-google
    Contributor

    I've seen this recently as well (caused by a recent Dart SDK roll). We need to add an input dependency on gen_snapshot as well, so they build creates a new snapshot if gen_snapshot has changed.

    Same issue as #8608, and slightly related to #8687.

  6. added a commit that references this issue on Mar 14, 2017
    32db9e7
  7. added a commit that references this issue on Mar 14, 2017
    9c6ffc8
  8. github-actions commented on Sep 5, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

t: gradle"flutter build" and "flutter run" on Android

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions