2

I am attempting to move some work across to my laptop from my main PC as I will work while travelling. I'm working on an app and emulating through android studio. My laptop has the same settings as my PC, however on the laptop I get this error when trying to run a build of the app:

* Where:
Build file '{path}\node_modules\react-native-mmkv\android\build.gradle' line: 163

* What went wrong:
A problem occurred evaluating project ':react-native-mmkv'.
> Expected directory '{path}\node_modules\react-native\android' to contain exactly one file, however, it contains more than one file.

The error points to this code

  if (!sourceBuild) {
    def rnAAR = fileTree("${defaultDir.toString()}").matching({ it.include "**/**/*.aar" }).singleFile
    extractJNI(files(rnAAR))
  }

I'm running the following versions of software:

Windows 11

node: 16.16.0

java: 15.0.2

gradle: 6.9 (nice)

react-native: 8.11.0


Any help would be appreciated, I've tried the only solutions online that I could find.

Thanks in advance


summary:

tried npm react-native run-android - was expecting the app to be successfully launched

  • Does this answer your question? [My React Native was working fine upto 4 November but now throwing an exception while Running yarn android](https://stackoverflow.com/questions/74370367/my-react-native-was-working-fine-upto-4-november-but-now-throwing-an-exception-w) – Thanhal P A Nov 10 '22 at 07:49

1 Answers1

0

Upgrade mmkv to the latest version. Should fix this issue

Daniyal
  • 175
  • 2
  • 8