invertase / notifee

⚛️ A feature rich notifications library for React Native.
https://notifee.app
Apache License 2.0
1.81k stars 213 forks source link

Could not find any matches for app.notifee:core:+ as no versions of app.notifee:core are available. #1072

Open jeffreybenabou opened 1 month ago

jeffreybenabou commented 1 month ago

Error: FAILURE: Build failed with an exception.

package.json

{ "name": "", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest", "update-app": "xx", "build-apk": "cd android && ./gradlew clean && yarn android --mode release" }, "dependencies": { "@invertase/react-native-apple-authentication": "^2.3.0", "@notifee/react-native": "7.8.2", "@react-native-async-storage/async-storage": "^1.21.0", "@react-native-community/geolocation": "^3.2.1", "@react-native-community/push-notification-ios": "^1.11.0", "@react-native-firebase/analytics": "^18.7.3", "@react-native-firebase/app": "^18.7.3", "@react-native-firebase/auth": "^18.7.3", "@react-native-firebase/firestore": "^18.7.3", "@react-native-firebase/functions": "^18.7.3", "@react-native-firebase/messaging": "^18.8.0", "@react-native-google-signin/google-signin": "^11.0.0", "@react-native-masked-view/masked-view": "^0.3.1", "@react-native-menu/menu": "^1.1.2", "@react-navigation/bottom-tabs": "^6.5.11", "@react-navigation/drawer": "^6.6.6", "@react-navigation/native": "^6.1.9", "@react-navigation/native-stack": "^6.9.17", "@react-navigation/stack": "^6.3.20", "@reduxjs/toolkit": "^2.0.1", "@rneui/base": "^4.0.0-rc.8", "@rneui/themed": "^4.0.0-rc.8", "@types/rn-fetch-blob": "^1.2.7", "axios": "^1.6.5", "date-fns": "^3.3.1", "lodash": "^4.17.21", "lottie-react-native": "^6.5.1", "react": "18.2.0", "react-moment": "^1.1.3", "react-native": "0.73.4", "react-native-animatable": "^1.4.0", "react-native-calendars": "^1.1304.1", "react-native-circular-progress": "^1.3.9", "react-native-code-push": "^8.3.0", "react-native-contacts": "^7.0.8", "react-native-date-picker": "^4.3.5", "react-native-element-dropdown": "^2.12.0", "react-native-gesture-handler": "^2.14.0", "react-native-gifted-charts": "^1.4.9", "react-native-google-mobile-ads": "^14.2.0", "react-native-image-picker": "^7.1.2", "react-native-linear-gradient": "^2.8.3", "react-native-localization": "^2.3.2", "react-native-localize": "^3.2.0", "react-native-pager-view": "^6.2.3", "react-native-permissions": "^4.1.5", "react-native-push-notification": "^8.1.1", "react-native-reanimated": "^3.6.1", "react-native-safe-area-context": "^4.8.2", "react-native-screens": "3.29.0", "react-native-star-rating-widget": "^1.8.0", "react-native-svg": "^14.1.0", "react-native-swiper-flatlist": "^3.2.4", "react-native-tab-view": "^3.5.2", "react-native-vector-icons": "^10.0.3", "react-native-webview": "^13.10.5", "react-redux": "^9.0.4", "redux": "^5.0.1", "rn-fetch-blob": "^0.12.0" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "0.73.21", "@react-native/eslint-config": "0.73.2", "@react-native/metro-config": "0.73.5", "@react-native/typescript-config": "0.73.1", "@types/react": "^18.2.6", "@types/react-native-vector-icons": "^6.4.18", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.6.3", "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "2.8.8", "react-test-renderer": "18.2.0", "typescript": "5.0.4" }, "engines": { "node": ">=18" }, "overrides": { "@rneui/themed": { "@rneui/base": "4.0.0-rc.8" } } }

jeffreybenabou commented 1 month ago

Fix it remove this line: org.gradle.configureondemand=true from gradle.properties

hackdie commented 1 month ago

Fix it remove this line: org.gradle.configureondemand=true from gradle.properties

i dont have that line and it keeps showing that error :|

jeffreybenabou commented 1 month ago

What is your version of notifee?

hackdie commented 1 month ago

What is your version of notifee?

7.8.0

jeffreybenabou commented 1 month ago

7.8.2 Update to this version

hackdie commented 1 month ago

7.8.2 Update to this version

worked 💯 thanks

andrei-cimpan commented 2 weeks ago

still getting this in 7.8.2

gilmarsquinelato commented 2 weeks ago

I'm also getting the same error in 7.8.2

Android gradle plugin: 8.2.1
Gradle: 8.8

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find any matches for app.notifee:core:+ as no versions of app.notifee:core are available.
     Searched in the following locations:
       - https://oss.sonatype.org/content/repositories/snapshots/app/notifee/core/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/app/notifee/core/maven-metadata.xml
       - file:<PROJECT_PATH>/node_modules/jsc-android/dist/app/notifee/core/maven-metadata.xml
       - https://dl.google.com/dl/android/maven2/app/notifee/core/maven-metadata.xml
       - https://www.jitpack.io/app/notifee/core/maven-metadata.xml
       - file:<PROJECT_PATH>/node_modules/react-native/android/app/notifee/core/maven-metadata.xml
     Required by:
         project :app > project :notifee_react-native

And if I add @notifee/react-native into the plugins list: The npx expo prebuild output

CommandError: Package "@notifee/react-native" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

Cannot use import statement outside a module
ddolheguy commented 1 week ago

I'm also seeing this issue using 7.8.2, anyone have a fix?

jeffelector commented 1 week ago

After upgrading to this version: 7.8.2 Maybe try to: remove all node_modules and yarn.lock (or any .lock) file you have,

after this try to reinstall node_modules then: npm install && npm start -- --reset-cache or yarn install && react-native start --reset-cache

gilmarsquinelato commented 1 week ago

So, I tried the following and I'm getting another error:

  1. rm -rf node_modules
  2. rm -rf android
  3. npm i
  4. npx expo prebuild --clean
  5. npx expo start -c

Then I pres a to open in in the android emulator. Once I do that I get the following error: ERROR Error: Notifee native module not found., js engine: hermes

And if I add @notifee/react-native in the plugins config, I get this:

CommandError: Package "@notifee/react-native" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

Cannot use import statement outside a module
gilmarsquinelato commented 3 days ago

Any updates on this? I'm not being able to use this library, and it's in a fresh expo project

Thanks again for the support :)

mikehardy commented 11 minutes ago

I don't use expo so I don't know if there are custom steps you need to do in order to add the internal repository with our core library .aar file into the gradle build via expo.

With bare react-native it works fine though, and I have never reproduced this error with the current module

The current versions of the module automatically add the internal repository with our core library to the list of repositories here:

https://github.com/invertase/notifee/blob/main/packages/react-native/android/build.gradle#L112-L117

Perhaps something in your build system is manipulating that list after the fact, or causing that code not to execute?