React-native-notifications: ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :reactnativenotifications.

Created on 3 Oct 2019  路  18Comments  路  Source: wix/react-native-notifications

Hello, I am following setup instructions guide here: https://github.com/wix/react-native-notifications/blob/master/docs/installation.md, but I am getting an error

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :reactnativenotifications.

Explored the package's path inside node_modules, tried the lib path but also the same issue. I'm using react native 0.58.

馃彋 stale

Most helpful comment

I had the same issue, but I skipped the installation step 5 "RNNotifications and React Native version" because I thought I have version 2.0.6 (I missed ^ symbol when I was installing the library with yarn add react-native-notifications@^2.0.6).

When I add missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative59" it worked.

All 18 comments

Which react-native-notifications version do you use?

Having the same issue.

"react": "16.4.1",
"react-native": "^0.61.2",
"react-native-notifications": "2.1.0",

@yogevbd here are the versions that I use:

"react": "16.6.3."
"react-native": "0.58.6"
"react-native-notifications": "^2.1.3"

Same issue here.
"react-native-notifications": "^3.0.0-beta.1",
"react-native": "0.60.4",
"react": "16.8.6"

In settings.gradle use react-native-notifications instead of reactnativenotifications. Works for me at least.

I had the same issue, but I skipped the installation step 5 "RNNotifications and React Native version" because I thought I have version 2.0.6 (I missed ^ symbol when I was installing the library with yarn add react-native-notifications@^2.0.6).

When I add missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative59" it worked.

I have fixed this issue using react-native-notifications instead of reactnativenotifications .

@meznaric @osamausmani
I still get this even when I change in settings.gradle I also updated in app/build.gradle
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :react-native-notifications.

Also, create a file in your project root folder

// react-native.config.js
module.exports = {
dependencies: {
'react-native-notifications': {
platforms: {
android: null, // disable Android platform, other platforms will still autolink if provided
},
},
},
};

@osamausmani yeah I had that, same issue.

@osamausmani yeah I had that, the same issue.

Delete npm_modules and do npm install.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

The issue has been closed for inactivity.

I had the same issue, but I skipped the installation step 5 "RNNotifications and React Native version" because I thought I have version 2.0.6 (I missed ^ symbol when I was installing the library with yarn add react-native-notifications@^2.0.6).

When I add missingDimensionStrategy "RNNotifications.reactNativeVersion", "reactNative59" it worked.

Worked for me. Initially I had ^3.1.1 so this solution was not working for me once I changed it to ^2.0.6. It worked. thank you...tada

Thanks @Kajustrevz
it worked for me as well I needed to fix the version

// package.json
"react-native-notifications": "2.0.6",
// react-native --version
react-native-cli: 2.0.1
react-native: 0.60.5
"react": "16.11.0",
"react-native": "0.62.2",
"react-native-notifications": "^3.2.2"

In settings.gradle ...

project(':reactnativenotifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/lib/android/app')

This sorted my problem, but I changed to:

- project(':reactnativenotifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/lib/android/app')
+ project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-notifications/lib/android/app')

Having the same issue.

"react": "16.8.6",
"react-native": "^0.60.5",
"react-native-notifications": "^3.4.0",

Was this page helpful?
0 / 5 - 0 ratings