Skip to content

Troubleshooting

Miguel Ruivo edited this page Apr 26, 2020 · 28 revisions

Android

a) Issue:

If for some reason when picking you receive an error telling that permissions are already being request, picker is already active or similar.

a) Possible solution:

Lately, there have been reports that projects that were started prior to Android V2 embedded, may need to update some properties in order to seamless support updated plugins.

Referring to EdwynZN answer on flutter permission handler plugin, following the official instructions to upgrade pre 1.12 Android projects, seem to fix.

Basically if your Android project MainActivity.java or kt is using io.flutter.app.FlutterActivity or your AndroidManifest.xml is using io.flutter.app.FlutterActivity or have

<meta-data
    android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
     android:value="true" />

you'll need to update your Flutter project in order to work with the new Android plugin type system.


b) Issue:

If your project fails building due to dependencies missing. Typically this happens with import androidx.lifecycle.DefaultLifecycleObserver; being not recognized.

b) Possible solution:

Typically this happens because your project isn't fully supporting Android X. Please make sure you have completely migrated to it, by checking the official instructions or you can just check if the requirements below are met.

  1. On your project's android/app/build.gradle change compileSdkVersion and targetSdkVersion to 28

  2. Go to android/gradle.properties file and add the following lines:

android.useAndroidX=true
android.enableJetifier=true

iOS

Issue:

I have an issue while picking multiple files from Photos app (gallery)

Possible solution:

This plugin uses DKImagePickerController as sub-dependency for multi picks on Photos app because ImagePickerController from iOS SDK doesn't allow it. Thus, any issue directly related to it, should be filed on its official repo.

Clone this wiki locally