Ariel
Ariel

Reputation: 1436

gradle is downloading an old version of react-native

When I try to run react-native run android an error is thrown:

ReactNativeBiometricsPackage is not abstract and does not override abstract method createJSModules()

I'm using react-native 0.63 (createJSModules was removed in an older version) so, this error shouldn't be happening but Gradle keeps downloading an older version that complains about the abstract method not being implemented.

Searching the web, I've found that adding the node_modules folder to android/build.gradle should be the solution but it keeps downloading the old version.

What else can I try?

Upvotes: 0

Views: 288

Answers (1)

Ariel
Ariel

Reputation: 1436

The problem was a dependency compiled for an older version of RN, after updating the dependency everything worked as expected.

From the react-native-fs docs:

For RN < 0.57 and/or Gradle < 3 you MUST install react-native-fs at version @2.11.17!

For RN >= 0.57 and/or Gradle >= 3 you MUST install react-native-fs at version >= @2.13.2!

For RN >= 0.61 please install react-native-fs at version >= @2.16.0!

Fun fact: the project didn't required that dependency at all so I deleted that reference after (MainApplication.java).

Upvotes: 1

Related Questions