React-native-notifications: On Trying to do installation for android getting runtime error though build is successful

Created on 8 May 2020  路  5Comments  路  Source: wix/react-native-notifications

After installing React native rotification on doing installation for android getting error as so

Screen Shot 2020-05-08 at 3 45 51 PM

My Code in Main Application

import com.wix.reactnativenotifications.RNNotificationsPackage;

...

@Override
protected List<ReactPackage> getPackages() {
   @SuppressWarnings("UnnecessaryLocalVariable")
   List<ReactPackage> packages = new PackageList(this).getPackages();
   // ... 
   // Add the following line: 
   packages.add(new RNNotificationsPackage(MainApplication.this)); 
   return packages;
}

I am also using react-native-navigation is that creating the problem? If yes how can I solve it?

My Package.json

{ "name": "COVIDHealthCheckUpApp", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "@react-native-community/geolocation": "^2.0.2", "react": "16.11.0", "react-native": "0.62.2", "react-native-navigation": "^6.5.0", "react-native-notifications": "^3.1.4" }, "devDependencies": { "@babel/core": "^7.6.2", "@babel/runtime": "^7.6.2", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^24.9.0", "eslint": "^6.5.1", "jest": "^24.9.0", "metro-react-native-babel-preset": "^0.58.0", "react-test-renderer": "16.11.0" }, "jest": { "preset": "react-native" } }

馃彋 stale

Most helpful comment

I'm running into the same issue

All 5 comments

I'm running into the same issue

You can skip the first step in the android installation guide on RN0.60+. The library is auto-linked.

If you read the error it mentions removing it, if added manually.

Removing it like @andreialecu said solved it for me.

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.

Was this page helpful?
0 / 5 - 0 ratings