ImagePicker, Expo SDK 44 and EAS Build trhows error on Gradlew build: Unresolved reference: ifNull

I mean the error changes depending on the following:

  1. Only expo-images-picker installed
  2. expo-images-picker and expo-image-picker installed
  3. expo-images-picker and expo-linear-gradient installed
  4. All three installed

But anyway, as you pointed out, the problems are with expo-images-picker.

EDIT:

By the way, @laneboyandrew, I found this by creating a new app and then taking the dependencies from your package.json. I did not change the JavaScript at all.

I then upgraded expo-linear-gradient, which expo doctor complained was slightly out of date.

After that I removed some dependencies that should probably be devDependencies (e.g. the eslint stuff).

Then I built the app to reproduce the crash.

After that I moved expo, react, react-dom and react-native to the top of the list of dependencies to facilitate the rest of the process.

Then I removed about half of the dependencies and built again to confirm it still crashed.

If it did not crash I reverted the last change (i.e. I added back the dependencies I removed in the previous step) and instead removed the other half. Then I built again to confirm that it crashed.

Otherwise if it did still crash I took the remaining dependencies and removed another half and built again. I repeated this process until I got to the three dependencies mentioned above and one other one. Then I started removing them one by one and narrowed down on expo-images-picker being the problem, but I noticed that the error was different. Then I tried adding back the other two in different combinations and found that it still crashed, but that the error was different.

Thank you so much for the reply. I use expo-images-picker library because as far as I understand expo-image-picker doesn’t support multiple images selection. Now I will remove expo-images-picker and if there are no problems… I actually don’t know, maybe you have some advice about good solution to make multi images select?

I haven’t tried this, but maybe you could use patch-package to move expo-image-manipulator and expo-media-library to the devDependencies section of expo-images-picker’s package.json. (i.e. do what Brent suggested in the issue he created, but without having to wait for a new release of expo-images-picker.)

Then install those two packages directly in your app.

1 Like