3

camera-roll stopped working. I've got an error while build the app.

android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:17: error: package undefined does not exist
import undefined.CameraRollPackage;

screen with error

Package was installed according to: https://www.npmjs.com/package/@react-native-camera-roll/camera-roll?activeTab=readme

My package.json:

"dependencies": {
    "@invertase/react-native-apple-authentication": "2.2.2",
    "@ptomasroos/react-native-multi-slider": "^2.2.2",
    "@react-native-camera-roll/camera-roll": "^5.2.3",
    "@react-native-community/async-storage": "^1.12.1",
    "@react-native-community/cli": "^7.0.4",
    "@react-native-community/cli-platform-ios": "^5.0.2",
    "@react-native-community/geolocation": "^3.0.6",
    "@react-native-community/image-editor": "^2.3.0",
    "@react-native-community/masked-view": "^0.1.10",
    "@react-native-cookies/cookies": "^6.2.1",
    "@react-native-firebase/app": "^16.4.6",
    "@react-native-firebase/auth": "^16.4.6",
    "@react-native-firebase/database": "^16.4.6",
    "@react-native-firebase/messaging": "^16.4.6",
    "@react-native-google-signin/google-signin": "9.0.2",
    "@react-navigation/core": "^6.4.3",
    "@react-navigation/material-top-tabs": "^6.4.0",
    "@react-navigation/native": "^6.0.16",
    "@react-navigation/stack": "^5.9.0",
    "axios": "^0.21.1",
    "deprecated-react-native-prop-types": "^2.3.0",
    "env-cmd": "^10.1.0",
    "fbjs": "^3.0.4",
    "geolib": "^3.3.1",
    "jsc-android": "^250230.2.1",
    "libphonenumber-js": "^1.7.57",
    "lodash": "^4.17.19",
    "moment": "^2.27.0",
    "patch-package": "^6.5.0",
    "pinar": "^0.12.1",
    "react": "^18.2.0",
    "react-devtools": "^4.27.0",
    "react-freeze": "^1.0.3",
    "react-moment": "^0.9.7",
    "react-native": "^0.68.5",
    "react-native-awesome-alerts": "^2.0.0",
    "react-native-cli": "^2.0.1",
    "react-native-clock-sync": "1.1.0-a",
    "react-native-console-view": "^0.0.21",
    "react-native-countdown-circle-timer": "^3.1.0",
    "react-native-country-picker-modal": "^2.0.0",
    "react-native-dotenv": "^3.4.8",
    "react-native-fbsdk": "^3.0.0",
    "react-native-fix-image": "^2.1.0",
    "react-native-flipper": "^0.174.0",
    "react-native-fs": "^2.16.6",
    "react-native-geolocation-service": "^5.3.1",
    "react-native-gesture-handler": "^2.9.0",
    "react-native-google-places-autocomplete": "^2.5.1",
    "react-native-image-crop-picker": "^0.36.2",
    "react-native-image-gallery": "^2.1.5",
    "react-native-image-picker": "^4.10.1",
    "react-native-image-resizer": "^1.4.5",
    "react-native-image-rotate": "github:barrsan/react-native-image-rotate",
    "react-native-image-size": "^1.1.3",
    "react-native-instagram-login": "^2.0.5",
    "react-native-keyboard-aware-scroll-view": "github:APSL/react-native-keyboard-aware-scroll-view#pull/501/head",
    "react-native-localize": "^2.2.6",
    "react-native-map-clustering": "^3.3.9",
    "react-native-maps": "0.27.1",
    "react-native-maps-directions": "^1.8.0",
    "react-native-ntp-client": "^1.0.1",
    "react-native-permissions": "^3.6.1",
    "react-native-progress-circle": "^2.1.0",
    "react-native-reanimated": "^2.14.4",
    "react-native-redash": "^12.6.1",
    "react-native-restart": "^0.0.22",
    "react-native-safe-area-context": "^3.4.1",
    "react-native-screens": "^3.18.0",
    "react-native-simple-image-cropper": "^4.0.0-beta-1",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-sound": "^0.11.0",
    "react-native-svg": "^12.1.0",
    "react-native-svg-uri": "^1.2.3",
    "react-native-tab-view": "^2.15.1",
    "react-native-text-ticker": "^1.6.0",
    "react-native-udp": "^3.1.0",
    "react-native-version-number": "^0.3.6",
    "react-native-video": "^5.1.1",
    "react-native-webview": "^11.26.0",
    "react-redux": "^7.2.1",
    "recompose": "^0.30.0",
    "redux": "^4.0.5",
    "redux-devtools-extension": "^2.13.8",
    "redux-form": "^8.3.6",
    "redux-thunk": "^2.3.0",
    "rn-fetch-blob": "^0.12.0",
    "styled-components": "^5.1.1"
  },
  "devDependencies": {
    "@babel/core": "^7.11.0",
    "@babel/plugin-external-helpers": "7.0.0",
    "@babel/preset-env": "^7.18.6",
    "@babel/preset-react": "^7.18.6",
    "@babel/runtime": "^7.11.0",
    "@react-native-community/eslint-config": "^1.1.0",
    "axios-mock-adapter": "^1.18.2",
    "babel-jest": "^25.5.1",
    "babel-plugin-transform-remove-console": "^6.9.4",
    "babel-preset-react-native": "^4.0.1",
    "eslint": "^6.8.0",
    "jest": "^25.5.4",
    "metro-config": "^0.73.3",
    "metro-react-native-babel-preset": "^0.73.3",
    "react-native-codegen": "^0.71.5",
    "react-native-svg-transformer": "^0.14.3",
    "react-test-renderer": "16.11.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "rnpm": {
    "assets": [
      "./src/assets/fonts/"
    ]
  },
  "browser": {
    "dgram": "react-native-udp"
  }
}

I've tried to clean cache in Android Studio (v. Android Studio Electric Eel | 2022.1.1 Patch 1), update Android SDK platform tools (v. 34.0.3), ./gradlew clean, link / unlink camera-roll package

1 Answers1

0

try

yarn add @react-native-camera-roll/camera-roll@5.6.0

from https://github.com/react-native-cameraroll/react-native-cameraroll/issues/522

Fedor
  • 17,146
  • 13
  • 40
  • 131
Andreg
  • 1