Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[πŸ›]Β #2380

@karimatsh

Description

@karimatsh

Description

When building the app with [email protected], the build fails on Android with the following errors:

  • Cannot resolve symbol 'PickMultipleVisualMedia'

  • Cannot resolve symbol 'PickVisualMedia'

  • createIntent(Context, PickVisualMediaRequest) not found

  • And eventually: java.lang.StackOverflowError

I've added all recommended dependencies and configurations, including the latest androidx.activity libraries. The issue seems to be caused by Android 13+ Photo Picker integration in this version of the library, possibly with recursive references or improper compatibility with React Native 0.71.x.

How to repeat issue and example

  • Use react-native 0.71.8 with react-native-image-picker 7.2.3

  • Add androidx.activity:activity:1.9.3 and activity-ktx:1.9.3 to android/app/build.gradle

  • Set minSdkVersion = 24, targetSdkVersion = 34, compileSdkVersion = 34

  • Run npx react-native run-android

  • Compilation fails with unresolved symbols and StackOverflowError

Solution

  • Review Android 13+ support implementation in ImagePickerModuleImpl.java

  • Ensure compatibility with React Native 0.71.x (likely the ReactModuleInfo and PickVisualMedia integrations depend on RN 0.72+)

  • Resolve potential circular references or excessive recursion causing javac to crash

Additional Information

  • Image Picker version: 7.2.3

  • React Native version: 0.71.8

  • Platform: Android

  • Development Operating System: macOS 12.7

  • Dev tools: Android Studio Hedgehog | Java 17 | Android SDK 34

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions