Skip to content

Adding Flutter to existing application and the parent project is not named 'app' causes crash #24427

Closed

Description

@martinez8859

My android application module was not named 'app'
This would cause a crash at app start that says.

2018-11-16 15:21:02.029 20108-20108/? E/flutter: [ERROR:flutter/runtime/dart_vm.cc(259)] VM snapshot must be valid.
2018-11-16 15:21:02.029 20108-20108/? A/flutter: [FATAL:flutter/shell/common/shell.cc(212)] Check failed: vm. Must be able to initialize the VM.

In flutter.gradle it is assumed that the module is named 'app' on this line.

Task mergeAssets = project.tasks.findByPath(":app:merge${variant.name.capitalize()}Assets")

Workaround is obviously to rename your application module to app.
Would be nice if either this were not required of if the wiki outlined this requirement.

[✓] Flutter (Channel beta, v0.11.3, on Mac OS X 10.13.6 17G3025, locale en-AU)
    • Flutter version 0.11.3 at /Users/mike/Documents/flutter
    • Framework revision 72bf075e8d (6 days ago), 2018-11-09 20:36:17 -0800
    • Engine revision 5646e86a6f
    • Dart version 2.1.0 (build 2.1.0-dev.9.3 9c07fb64c4)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/mike/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/mike/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio
    • Android Studio at /Applications/Android Studio 3.2 Preview.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b04)

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)

[!] IntelliJ IDEA Community Edition (version 2017.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0
      (API 27) (emulator)

! Doctor found issues in 1 category.

Activity

  1. added
    c: crashStack traces logged to the console
    a: existing-appsIntegration with existing apps via the add-to-app flow
    on Nov 19, 2018
  2. added this to the milestone on Nov 19, 2018
  3. zoechi commented on Nov 30, 2018

    @zoechi
    Contributor

    Similar to #24641

  4. reopened this on Dec 6, 2018
  5. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Dec 6, 2018
  6. added
    customer: crowdAffects or could affect many people, though not necessarily a specific customer.
    on Jan 10, 2019
  7. jmagman commented on Dec 19, 2019

    @jmagman
    Member

    I believe this was fixed with #27154.

  8. github-actions commented on Aug 14, 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 Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowc: crashStack traces logged to the consolecustomer: crowdAffects or could affect many people, though not necessarily a specific customer.platform-androidAndroid applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions