Skip to content

Crashing on launch when updating Android Gradle Plugin to 4.0.0 using app bundle #58479

@arturogutierrez

Description

@arturogutierrez

It's always crashing when updating the Android Gradle Plugin to 4.0.0. No matter if it's the latest ImagePicker version or not.

Steps to Reproduce

Currently, no idea why it doesn't crash on the emulator (maybe it's something related to R8 because the emulator doesn't have release build mode).

Here my steps:

  1. Create an app bundle of an app with ImagePicker plugin added
  2. Install it on the device
  3. Just run the app

Logs

Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lio/flutter/plugins/imagepicker/ImagePickerPlugin$LifeCycleObserver;
       at io.flutter.plugins.imagepicker.ImagePickerPlugin.setup(ImagePickerPlugin.java:22)
       at io.flutter.plugins.imagepicker.ImagePickerPlugin.onAttachedToActivity(ImagePickerPlugin.java:27)
       at io.flutter.embedding.engine.FlutterEnginePluginRegistry.add(FlutterEnginePluginRegistry.java:106)
       at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:56)
       at com.arturogutierrez.acnhcompanion.MainActivity.configureFlutterEngine(MainActivity.java:5)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:64)
       at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:20)
Caused by java.lang.IllegalAccessError: Interface androidx.lifecycle.c implemented by class io.flutter.plugins.imagepicker.ImagePickerPlugin$LifeCycleObserver is inaccessible (declaration of 'io.flutter.plugins.imagepicker.ImagePickerPlugin$LifeCycleObserver' appears in /data/app/com.arturogutierrez.acnhcompanion-9Qila6WPNT5CzI3jOOnXHg==/base.apk)
       at io.flutter.plugins.imagepicker.ImagePickerPlugin.setup(ImagePickerPlugin.java:22)
       at io.flutter.plugins.imagepicker.ImagePickerPlugin.onAttachedToActivity(ImagePickerPlugin.java:27)
       at io.flutter.embedding.engine.FlutterEnginePluginRegistry.add(FlutterEnginePluginRegistry.java:106)
       at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:56)
       at com.arturogutierrez.acnhcompanion.MainActivity.configureFlutterEngine(MainActivity.java:5)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:64)
       at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:20)
Fatal Exception: java.lang.IllegalAccessError: io.flutter.plugins.imagepicker.ImagePickerPlugin$LifeCycleObserver
       at io.flutter.plugins.imagepicker.ImagePickerPlugin.setup(ImagePickerPlugin.java)
       at io.flutter.plugins.imagepicker.ImagePickerPlugin.onAttachedToActivity(ImagePickerPlugin.java)
       at io.flutter.embedding.engine.FlutterEnginePluginRegistry.add(FlutterEnginePluginRegistry.java)
       at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java)
       at com.arturogutierrez.acnhcompanion.MainActivity.configureFlutterEngine(MainActivity.java)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java)
       at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listc: crashStack traces logged to the consolecustomer: crowdAffects or could affect many people, though not necessarily a specific customer.dependency: dartDart team may need to help usplatform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on AndroidtoolAffects 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