Skip to content

Crash App when add flutter module to existing apps #19818

@haihai111

Description

@haihai111

Hi everyone,i have a big problem i can't figure out.I have crash when i add flutter module to existing apps.I do follow this link https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps .It's working but when i add fabric.io to build.gradle of android project i have crash.

Steps to Reproduce

  1. do follow https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps it's working
  2. add fabric.io into build.gradle to android project
buildscript {
      repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
    mavenCentral()
}

implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
        transitive = true;
}
  1. Build again and app crash.Flutter log error like this

07-26 22:07:19.384 16435-16435/com.app.myapplication E/flutter: [ERROR:flutter/runtime/dart_vm.cc(256)] VM snapshot must be valid.
07-26 22:07:19.384 16435-16435/com.app.myapplication A/flutter: [FATAL:flutter/shell/common/shell.cc(216)] Check failed: vm. Must be able to initialize the VM.

screen shot 2018-07-26 at 10 07 37 pm

Logs

[07-26 22:07:19.384 16435-16435/com.app.myapplication E/flutter: [ERROR:flutter/runtime/dart_vm.cc(256)] VM snapshot must be valid.
07-26 22:07:19.384 16435-16435/com.app.myapplication A/flutter: [FATAL:flutter/shell/common/shell.cc(216)] Check failed: vm. Must be able to initialize the VM.
    
    
    --------- beginning of crash
07-26 22:07:19.384 16435-16435/com.app.myapplication A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 16435 (p.myapplication)
07-26 22:07:19.405 16485-16485/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-26 22:07:19.406 16485-16485/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86/generic_x86:8.0.0/OSR1.170901.043/4456315:user/release-keys'
    Revision: '0'
07-26 22:07:19.407 16485-16485/? A/DEBUG: ABI: 'x86'
    pid: 16435, tid: 16435, name: p.myapplication  >>> com.app.myapplication <<<
    signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-26 22:07:19.409 16485-16485/? A/DEBUG: Abort message: '[FATAL:flutter/shell/common/shell.cc(216)] Check failed: vm. Must be able to initialize the VM.
    '
        eax 00000000  ebx 00004033  ecx 00004033  edx 00000006
        esi 00004033  edi bffaada8
        xcs 00000073  xds 0000007b  xes 0000007b  xfs 0000003b  xss 0000007b
        eip acb6aac4  ebp bffaadc8  esp bffaad5c  flags 00200296
07-26 22:07:19.411 16485-16485/? A/DEBUG: backtrace:
        #00 pc 00000ac4  [vdso:acb6a000] (__kernel_vsyscall+16)
        #01 pc 00075b3c  /system/lib/libc.so (tgkill+28)
        #02 pc 0001f04e  /system/lib/libc.so (abort+110)
        #03 pc 00334383  /data/app/com.app.myapplication-Vn-1qYse4nMlk8AyJbFuPQ==/lib/x86/libflutter.so
        #04 pc 00334ab9  /data/app/com.app.myapplication-Vn-1qYse4nMlk8AyJbFuPQ==/lib/x86/libflutter.so
        #05 pc 000d1b4f  /data/app/com.app.myapplication-Vn-1qYse4nMlk8AyJbFuPQ==/lib/x86/libflutter.so
        #06 pc 0007cd33  /data/app/com.app.myapplication-Vn-1qYse4nMlk8AyJbFuPQ==/lib/x86/libflutter.so
        #07 pc 00086283  /data/app/com.app.myapplication-Vn-1qYse4nMlk8AyJbFuPQ==/lib/x86/libflutter.so
        #08 pc 0001b43a  /data/app/com.app.myapplication-Vn-1qYse4nMlk8AyJbFuPQ==/oat/x86/base.odex (offset 0x1b000)
        #09 pc 000d9fff  [anon:libc_malloc:a8500000]
        #10 pc 0056e99f  /dev/ashmem/dalvik-main space (region space) (deleted)

Metadata

Metadata

Assignees

Labels

a: existing-appsIntegration with existing apps via the add-to-app flowc: crashStack traces logged to the console

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions