0

My build apk doesn't work as expected. but debug apk works perfectly. when i run flutter run --release -v it shows:-

  • MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite)

  • Unhandled Exception: MissingPluginException(No implementation found for method pickImage on channel plugins.flutter.io/image_picker)

How can i solve this issue.

  • have you tried this `https://stackoverflow.com/a/62929583/8380779` – kenn Feb 05 '21 at 06:00
  • yes i tried this. it shows another error : Unresolved reference: registrarFor – Natsu Dragnal Feb 05 '21 at 06:06
  • have you tried this `https://stackoverflow.com/questions/53992118/unresolved-reference-android-on-new-flutter-project` or `https://stackoverflow.com/questions/56965783/flutter-plugin-development-unresolved-reference-io/56974312`? Basically, rebuild the project or invalidate cache and restart. – kenn Feb 05 '21 at 06:14

2 Answers2

0

This probably related with current issue in flutter (https://github.com/flutter/flutter/issues/65334) where DefaultLifecycleObserver got removed by proguard. See explanation: https://github.com/flutter/flutter/issues/58479#issuecomment-763259817

The solution is by adding the line below to your android app/proguard-rules.pro:

-keep class androidx.lifecycle.DefaultLifecycleObserver
ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
0

Solved this issue by downgrading buld.gradle to com.android.tools.build:gradle:3.5.0