Unresolved reference: core

I have installed expo-document-picker and when I ran it from Android Studio getting following error,

 /node_modules/expo-document-picker/android/src/main/java/expo/modules/documentpicker/DocumentPickerModule.kt: (10, 21): Unresolved reference: core

The file above error pointing to looks like this,

package expo.modules.documentpicker

import android.app.Activity
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import org.apache.commons.io.FilenameUtils
import org.apache.commons.io.IOUtils
import expo.modules.core.ExportedModule
import expo.modules.core.ModuleRegistry
import expo.modules.core.ModuleRegistryDelegate
import expo.modules.core.Promise
import expo.modules.core.interfaces.ActivityEventListener
import expo.modules.core.interfaces.ActivityProvider
import expo.modules.core.interfaces.ExpoMethod
import expo.modules.core.interfaces.services.UIManager
import expo.modules.core.utilities.FileUtilities
import java.io.File
import java.io.FileOutputStream
import java.io.IOException

This is my project configuration:

"expo-document-picker": "10.1.0",
"react": "17.0.2",
"react-native": "0.66.4",
"react-native-unimodules": "0.14.10"

Android configuration:

buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30

Can some one help m etc resolve this issue please?. Thank you.

Hey @syamk, a couple quick things here.

  • You’re running react-native 0.66 so you’re in the YMMV zone where we can’t provide support.

  • We’ve migrated from unimodules to expo modules so I’m inclined to believe the fact you still have the unimodules dependency in your project could be causing issues.

Cheers,
Adam

Yes, You are right. Issue got resolved after I migrated to Expo. Thank you.