Repository navigation
Adding Flutter to existing application and the parent project is not named 'app' causes crash #24427
Copy link
Copy link
Closed
Labels
a: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowc: crashStack traces logged to the consoleStack traces logged to the consolecustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.platform-androidAndroid applications specificallyAndroid applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: existing-appsIntegration with existing apps via the add-to-app flowIntegration with existing apps via the add-to-app flowc: crashStack traces logged to the consoleStack traces logged to the consolecustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.platform-androidAndroid applications specificallyAndroid applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
zoechi commentedon Nov 30, 2018
Similar to #24641
jmagman commentedon Dec 19, 2019
I believe this was fixed with #27154.
github-actions commentedon Aug 14, 2021
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 -vand a minimal reproduction of the issue.