react-native-threads icon indicating copy to clipboard operation
react-native-threads copied to clipboard

Error while running react-native-threads

Open vedant-dobby opened this issue 4 years ago • 2 comments

Hi I'm using React Native: 0.59.10 and Android 9. I have used Jetifier for new packages. Whenever I'm using react-native run-android, I get the following error.

error: constructor RNThreadPackage in class RNThreadPackage cannot be applied to given types;
            new RNThreadPackage(),
            ^
  required: ReactNativeHost,ReactPackage[]
  found: no arguments
  reason: actual and formal argument lists differ in length
1 error

I'm guessing it has to do with something with the parameters of the constructor and is there a way to fix this temporarily.

vedant-dobby avatar Sep 19 '19 07:09 vedant-dobby

I solved this issue by manual linking,

create a file name react-native.config.js and add the following code in this file,

// react-native.config.js
module.exports = {
  dependencies: {
    'react-native-threads': {
      platforms: {android: null},
    },
  },
};

Then follow the doc for manual linking procedure, that's it.

skdev24 avatar Sep 24 '19 06:09 skdev24

https://github.com/joltup/react-native-threads/issues/81

minicuper avatar Oct 02 '19 14:10 minicuper