Skip to content

app crashed when i startactivity flutterActivity in add flutter into a exiting android project #24268

@manondidi

Description

@manondidi

add flutter into a exiting android project
both debug run app and generate apk
app crashed when i startactivity flutterActivity

Logs

 E/flutter: [ERROR:flutter/runtime/dart_vm.cc(259)] VM snapshot must be valid.
  A/flutter: [FATAL:flutter/shell/common/shell.cc(212)] Check failed: vm. Must be able to initialize the VM.
    
    
    --------- beginning of crash
  A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 4697 ( )
2018-11-13 10:24:03.577 5011-5011/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2018-11-13 10:24:03.577 5011-5011/? A/DEBUG: Build fingerprint: 'xiaomi/vince/vince:7.1.2/N2G47H/V9.6.3.0.NEGCNFD:user/release-keys'
2018-11-13 10:24:03.577 5011-5011/? A/DEBUG: Revision: '0'
2018-11-13 10:24:03.577 5011-5011/? A/DEBUG: ABI: 'arm'
2018-11-13 10:24:03.577 5011-5011/? A/DEBUG: pid: 4697, tid: 4697, name: 17173.challenge  >>> com.u17173.challenge <<<
2018-11-13 10:24:03.578 5011-5011/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2018-11-13 10:24:03.581 5011-5011/? A/DEBUG: Abort message: '[FATAL:flutter/shell/common/shell.cc(212)] Check failed: vm. Must be able to initialize the VM.
    '
2018-11-13 10:24:03.582 5011-5011/? A/DEBUG:     r0 00000000  r1 00001259  r2 00000006  r3 00000008
2018-11-13 10:24:03.582 5011-5011/? A/DEBUG:     r4 f3640590  r5 00000006  r6 f3640538  r7 0000010c
2018-11-13 10:24:03.582 5011-5011/? A/DEBUG:     r8 00000000  r9 ffe30bb4  sl d1532880  fp ffe30ef8
2018-11-13 10:24:03.582 5011-5011/? A/DEBUG:     ip 00000009  sp ffe307b8  lr f2f062f7  pc f2f08b78  cpsr 200f0010
2018-11-13 10:24:03.587 5011-5011/? A/DEBUG: backtrace:
2018-11-13 10:24:03.587 5011-5011/? A/DEBUG:     #00 pc 00049b78  /system/lib/libc.so (tgkill+12)
2018-11-13 10:24:03.588 5011-5011/? A/DEBUG:     #01 pc 000472f3  /system/lib/libc.so (pthread_kill+34)
2018-11-13 10:24:03.588 5011-5011/? A/DEBUG:     #02 pc 0001d595  /system/lib/libc.so (raise+10)
2018-11-13 10:24:03.588 5011-5011/? A/DEBUG:     #03 pc 000190e1  /system/lib/libc.so (__libc_android_abort+34)
2018-11-13 10:24:03.588 5011-5011/? A/DEBUG:     #04 pc 00017144  /system/lib/libc.so (abort+4)
2018-11-13 10:24:03.588 5011-5011/? A/DEBUG:     #05 pc 0053ebab  /data/app/com.u17173.challenge-1/lib/arm/libflutter.so (offset 0x4e5000)
2018-11-13 10:24:03.588 5011-5011/? A/DEBUG:     #06 pc 00536fdb  /data/app/com.u17173.challenge-1/lib/arm/libflutter.so (offset 0x4e5000)
2018-11-13 10:24:03.588 5011-5011/? A/DEBUG:     #07 pc 01528fb1  /data/app/com.u17173.challenge-1/oat/arm/base.odex (offset 0x13cd000)
2018-11-13 10:24:05.503 557-557/? E/lowmemorykiller: Error writing /proc/4697/oom_score_adj; errno=22
2018-11-13 10:24:05.551 1550-1688/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=543, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ]
2018-11-13 10:24:05.555 475-2426/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only

Analyzing my_flutter...

   info • Unused import: 'package:challenge_shop/data/api.dart' •
          lib/app.dart:1:8 • unused_import
   info • Unused import: 'package:challenge_shop/data/remote_service.dart' •
          lib/app.dart:2:8 • unused_import
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/common/state_cover.dart:4:7 • must_be_immutable
   info • Don't explicitly initialize variables to null • lib/data/api.dart:5:10
          • avoid_init_to_null
   info • Avoid using braces in interpolation when not needed •
          lib/data/api.dart:47:63 • unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed •
          lib/data/api.dart:65:61 • unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed •
          lib/data/api.dart:81:47 • unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed •
          lib/data/api.dart:92:39 • unnecessary_brace_in_string_interps
   info • The target expression uses '?.', so its value can be null •
          lib/data/converter/shop_banner_converter.dart:17:33 •
          can_be_null_after_null_aware
   info • Avoid using braces in interpolation when not needed •
          lib/data/mock_api.dart:7:53 • unnecessary_brace_in_string_interps
   info • Don't explicitly initialize variables to null •
          lib/data/remote_service.dart:21:14 • avoid_init_to_null
   info • Avoid using braces in interpolation when not needed •
          lib/error/result_error.dart:8:16 • unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed •
          lib/error/result_error.dart:8:30 • unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed •
          lib/error/unlogin_result_error.dart:8:16 •
          unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed •
          lib/error/unlogin_result_error.dart:8:30 •
          unnecessary_brace_in_string_interps
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/detail/exchange_dialog.dart:3:7 • must_be_immutable
   info • Avoid using braces in interpolation when not needed •
          lib/page/detail/exchange_dialog.dart:35:31 •
          unnecessary_brace_in_string_interps
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/detail/goods_detail_page.dart:20:7 • must_be_immutable
   info • The value of the '?.' operator can be 'null', which isn't appropriate
          as an operand of a logical operator •
          lib/page/detail/goods_detail_page.dart:447:15 •
          null_aware_in_logical_operator
   info • Avoid using braces in interpolation when not needed •
          lib/page/detail/goods_detail_page.dart:570:10 •
          unnecessary_brace_in_string_interps
   info • Avoid using braces in interpolation when not needed •
          lib/page/home/goods_cell.dart:37:47 •
          unnecessary_brace_in_string_interps
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/home/shop_banner.dart:7:7 • must_be_immutable
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/home/shop_header.dart:7:7 • must_be_immutable
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/home/shop_news.dart:7:7 • must_be_immutable
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/reward_history/reward_dialog.dart:9:7 • must_be_immutable
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/reward_history/reward_record_cell.dart:8:7 •
          must_be_immutable
   info • The left operand uses '?.', so its value can be null •
          lib/page/reward_history/reward_record_cell.dart:32:82 •
          null_aware_before_operator
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/score/score_overdue_alarm.dart:4:7 • must_be_immutable
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/score/score_record_cell.dart:5:7 • must_be_immutable
   info • This class inherits from a class marked as @immutable, and therefore
          should be immutable (all instance fields must be final) •
          lib/page/success/success_page.dart:3:7 • must_be_immutable
[✓] Flutter (Channel master, v0.10.3-pre.5, on Mac OS X 10.14 18A391, locale
    zh-Hans-CN)
    • Flutter version 0.10.3-pre.5 at /Users/czq/flutter
    • Framework revision 557ae71ea8 (22 hours ago), 2018-11-12 12:57:04 +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/czq/Library/Android/sdk
    • Android NDK at /Users/czq/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/czq/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.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    ✗ libimobiledevice and ideviceinstaller are not installed. To install with
      Brew, run:
        brew update
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    ✗ ios-deploy not installed. To install with Brew:
        brew install ios-deploy
    • CocoaPods version 1.6.0.beta.1

[✓] 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 Ultimate Edition (version 2017.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA.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)
    • Redmi 5 Plus • 53b0f53c0005 • android-arm64 • Android 7.1.2 (API 25)

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowt: gradle"flutter build" and "flutter run" on Androidwaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions