expo.modules.imagepicker.ImagePickerFileProvider

Hello am using Bear flow, am android app works well but on android 4.4 i get the following errors, from expo-image-picker can someone help ? Thanks

My package.json

{
  "scripts": {
    "start": "react-native start",
    "android": "react-native run-android",
    "ios": "react-native run-ios"
  },
  "dependencies": {
    "@expo/vector-icons": "^10.0.3",
    "@react-native-community/netinfo": "3.2.1",
    "axios": "^0.18.0",
    "expo": "^34.0.3",
    "expo-ads-admob": "~6.0.0",
    "expo-analytics-amplitude": "~6.0.0",
    "expo-font": "^6.0.1",
    "expo-image-picker": "~6.0.0",
    "expo-linear-gradient": "~6.0.0",
    "expo-permissions": "~6.0.0",
    "firebase": "^5.7.3",
    "hoist-non-react-statics": "^3.3.0",
    "md5": "^2.2.1",
    "moment": "^2.24.0",
    "prop-types": "^15.7.2",
    "react": "16.8.3",
    "react-dom": "^16.8.6",
    "react-native": "0.59.8",
    "react-native-app-walkthrough": "1.0.1",
    "react-native-gesture-handler": "1.3.0",
    "react-native-htmlview": "^0.14.0",
    "react-native-json-tree": "^1.2.0",
    "react-native-pdf": "^5.1.3",
    "react-native-reanimated": "1.1.0",
    "react-native-render-html": "^4.1.2",
    "react-native-screens": "1.0.0-alpha.22",
    "react-native-searchbar": "^1.16.0",
    "react-native-unimodules": "~0.5.2",
    "react-native-web": "^0.11.4",
    "react-navigation": "^3.11.1",
    "react-redux": "6.0",
    "redux": "^4.0.1",
    "redux-persist": "5.10.0",
    "redux-saga": "^1.0.3",
    "rn-fetch-blob": "0.10.13",
    "styled-components": "^4.3.2",
    "uuid": "^3.3.2"
  },
  "devDependencies": {
    "babel-preset-expo": "^5.0.0",
    "jetifier": "^1.6.4"
  },
  "private": true
}

PS: i have multiDexEnabled enable


09-20 02:03:47.631 3864-3864/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x9cd56b20)
09-20 02:03:47.631 3864-3864/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.kawlo, PID: 3864
    java.lang.RuntimeException: Unable to get provider expo.modules.imagepicker.ImagePickerFileProvider: java.lang.ClassNotFoundException: Didn't find class "expo.modules.imagepicker.ImagePickerFileProvider" on path: DexPathList[[zip file "/data/app/com.kawlo-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.kawlo-1, /system/lib]]
        at android.app.ActivityThread.installProvider(ActivityThread.java:4793)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4385)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4325)
        at android.app.ActivityThread.access$1500(ActivityThread.java:135)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5017)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
        at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "expo.modules.imagepicker.ImagePickerFileProvider" on path: DexPathList[[zip file "/data/app/com.kawlo-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.kawlo-1, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
        at android.app.ActivityThread.installProvider(ActivityThread.java:4778)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4385) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4325) 
        at android.app.ActivityThread.access$1500(ActivityThread.java:135) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:136) 
        at android.app.ActivityThread.main(ActivityThread.java:5017) 
        at java.lang.reflect.Method.invokeNative(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:515) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
        at dalvik.system.NativeStart.main(Native Method)

Hi @lewatt23

According to the documentation, Android 4.4 is not supported by the managed workflow.

The minimum supported OS versions are Android 5+ and iOS 10+ . If you need to support older versions, you will not be able to use the managed workflow.

This implies that you can run an ejected app on an older version of Android, but I don’t know how this works. Did you have to do something special to support Android 4.4 in your bare workflow app? Is it enough to just eject and then build it yourself?

By the way, are you using the same APK on Android 4.4 and newer versions of Android?

Hey @wodin
Thanks for your fast reply, yes expo does not support 4.4 but in bear flow you can can decide to support for Android 4.4.

For my problem i actually resolved it, it was more of a problem of MultiDex than expo cause when you set MultiDex to true your does not support 4.4 anymore.

Yes am using the same APK on 4.4 an on the newer version, but i don’t know if it’s the right way i just start android dev some 8 months ago, so please if there a better way am open to suggestions. slight_smile: .

Thanks

2 Likes

I’m glad you solved your problem.

I am also pretty new to Android development, so I am also still learning.

1 Like