Closed next6leo closed 1 year ago
Hmm. Give me your package.json to see what libraries have you installed
@mdjfs is like the expo media library version 12.1.2 not support usePermissions hook { "name": "app", "scripts": { "start": "react-native start", "android": "react-native run-android", "ios": "react-native run-ios", "web": "expo start --web", "eject": "expo eject" }, "resolutions": { "@expo/react-native-action-sheet": "^3.6.0" }, "dependencies": { "@expo-google-fonts/rubik": "^0.1.0", "@hmscore/react-native-hms-location": "^5.1.0-303", "@hmscore/react-native-hms-map": "^5.2.0-302", "@hmscore/react-native-hms-push": "^5.3.0-304", "@react-native-async-storage/async-storage": "^1.15.15", "@react-native-community/netinfo": "6.0.0", "@react-native-community/viewpager": "5.0.11", "expo": "^42.0.0", "expo-asset": "~8.3.3", "expo-background-fetch": "~9.2.2", "expo-blur": "~9.0.3", "expo-constants": "~11.0.1", "expo-device": "~3.3.0", "expo-font": "~9.2.1", "expo-gl": "~10.4.2", "expo-image-manipulator": "~9.2.2", "expo-image-picker": "~10.2.2", "expo-images-picker": "^2.4.1", "expo-linear-gradient": "~9.2.0", "expo-linking": "~2.3.1", "expo-localization": "~10.2.0", "expo-location": "~12.1.2", "expo-media-library": "~12.1.2", "expo-notifications": "~0.12.3", "expo-permissions": "~12.1.1", "expo-image-multiple-picker": "~4.7.2", "expo-pixi": "^1.2.0", "expo-secure-store": "~10.2.0", "expo-sharing": "~9.2.1", "expo-splash-screen": "~0.11.2", "expo-status-bar": "~1.0.4", "expo-structured-headers": "^1.1.1", "expo-task-manager": "~9.2.2", "expo-updates": "~0.8.1", "expo-web-browser": "~9.2.0", "i18n-js": "^3.8.0", "moment": "^2.24.0", "prop-types": "^15.7.2", "react": "16.13.1", "react-dom": "16.13.1", "react-native": "~0.63.4", "react-native-animatable": "^1.3.3", "react-native-auto-height-image": "^3.2.4", "react-native-calendars": "^1.212.0", "react-native-code-push": "^7.0.4", "react-native-dropdown-picker": "^3.1.11", "react-native-elements": "^1.2.7", "react-native-expo-image-cache": "^4.1.0", "react-native-fast-image": "^8.5.11", "react-native-gesture-handler": "~1.10.2", "react-native-get-random-values": "~1.7.0", "react-native-gifted-chat": "^0.16.3", "react-native-keyboard-aware-scroll-view": "^0.9.3", "react-native-mime-types": "^2.3.0", "react-native-modal": "^11.4.0", "react-native-modal-datetime-picker": "^7.6.0", "react-native-progress": "^4.1.2", "react-native-reanimated": "~2.2.0", "react-native-screens": "~3.4.0", "react-native-select-dropdown": "^1.0.9", "react-native-signature-canvas": "^4.3.0", "react-native-snap-carousel": "^3.9.1", "react-native-splash-screen": "^3.2.0", "react-native-svg": "12.1.1", "react-native-swipe-list-view": "^3.2.9", "react-native-swiper": "^1.6.0-rc.3", "react-native-unimodules": "0.14.10", "react-native-vector-icons": "^6.6.0", "react-native-video": "^4.4.5", "react-native-view-shot": "3.1.2", "react-native-web": "~0.13.12", "react-native-webview": "11.6.2", "react-native-youtube-iframe": "^2.1.0", "react-navigation": "^4.0.10", "react-navigation-stack": "^1.10.3", "react-navigation-tabs": "^2.5.6", "react-redux": "^7.1.1", "redux": "^4.0.4", "redux-logger": "^3.0.6", "redux-persist": "^6.0.0", "redux-thunk": "^2.3.0", "rn-pdf-reader-js": "^4.1.1", "rn-range-slider": "^1.3.1", "uuid": "^3.4.0" }, "devDependencies": { "@babel/core": "~7.9.0", "@babel/runtime": "^7.6.2", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^26.0.1", "babel-plugin-transform-remove-console": "^6.9.4", "eslint": "^6.5.1", "jest": "^26.0.1", "jetifier": "^1.6.3", "metro-react-native-babel-preset": "^0.56.0", "react-test-renderer": "16.9.0" }, "jest": { "preset": "react-native" }, "private": true, "version": "1.0.0" }
Yeah you're right. The commit for that hook was merged in Aug 2021. And Expo SDK 42 was published in Jul 2021. Then the minimum to have this library working probably will be Expo SDK 43 released in Oct 2021
@mdjfs so if i upgrade my expo to SDK 43 then the error will gone?
Yes
Yes
@mdjfs understand thank you very much.
Hi @mdjifs after successful compiled(https://github.com/mdjfs/expo-image-multiple-picker/issues/7) when try call expo-images-multiple-picker this error show up TypeError: MediaLibrary.usePermissions is not a function. (In 'MediaLibrary.usePermissions()', 'MediaLibrary.usePermissions' is undefined) I have permission set in AndroidManifest android.permission.READ_EXTERNAL_STORAGE android.permission.WRITE_EXTERNAL_STORAGE android.permission.MEDIA_LIBRARY android.permission.ACCESS_MEDIA_LOCATION