react-native-mmkv
react-native-mmkv copied to clipboard
Fails to compile with RN 0.69
When using latest RC 6 the project fails to compile with:
FAILURE: Build failed with an exception.
* Where:
Build file '[...]/node_modules/react-native-mmkv/android/build.gradle' line: 163
* What went wrong:
A problem occurred evaluating project ':react-native-mmkv'.
> Expected directory '[...]/node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.
I think this is due to hermes now being bundled as source code. It's possible that using the newish com.facebook.react
gradle plugin instead would solve these problems and greatly simplify your build.gradle
.
Ah yes, that'd be awesome! Do you have any references for that new plugin?
...does it even work with CMake? They're using Makefiles...
Is there a solution? I also encountered this problem.
This one: https://github.com/facebook/react-native/tree/HEAD/packages/react-native-gradle-plugin
As documented here: https://reactnative.dev/docs/new-architecture-library-android
same problem
android/build.gradle
file's
def rnAAR = fileTree("${defaultDir.toString()}").matching({ it.include "**/**/*.aar" }).singleFile
above code makes this problem, pattern should be change from RN0.69
indicated below is sample from react-native-reanimated
"**/react-native/**/*${buildType}.aar"
(fyi. https://github.com/software-mansion/react-native-reanimated/blob/main/android/build.gradle#L532)
I made PR #414
+1
Is this even still a problem with the latest MMKV? I thought the new buildscript fixes that?
This can help https://www.youtube.com/watch?v=iL-o8IJhwSQ&list=PLQhQEGkwKZUrempLnmxjt7ZCZJu1W3p2i&index=16
Hey! Sorry I cannot reproduce the issue here and it has been inactive for a while. I am going over issues right now and want to keep the repo clean - so I'm closing this for now, if anyone can post a reproduceable example here I can re-open and take a look :)