react-native-mmkv
                                
                                
                                
                                    react-native-mmkv copied to clipboard
                            
                            
                            
                        [ANDROID] Build error react-native-mmkv:configureCMakeDebug[arm64-v8a]
I got this error when building app in andoird
* What went wrong:
Execution failed for task ':react-native-mmkv:configureCMakeDebug[arm64-v8a]'.
> [CXX1428] exception while building Json A problem occurred starting process 'command '/Users/mjlt2/Library/Android/sdk/cmake/3.22.1/bin/cmake''
Env
- "react-native": "0.72.3",
 - "react-native-mmkv": "^2.10.1"
 
Please help me.
I fixed this issue by installing rosetta with:
softwareupdate --install-rosetta
I did a reset to my m1 macbook, and I haven't installed rosetta, but this fixed for me.
If you still have this error after enabling rosetta, take a look on these answers on stack overflow: https://stackoverflow.com/questions/73881553/error-while-executing-npx-react-native-run-android-execution-failed-for-task
This solution is not working for me
I seem to have similar issue in 0.72. A problem occurred configuring project ':react-native-mmkv'.
Could not create task ':react-native-mmkv:configureCMakeDebug[armeabi-v7a]'. "react-native-mmkv": "2.10.2", "react-native": "0.72.4",
0.72 version uses cmake 3.22.1 by default. 0.71 version builds without a problem. project needs to upgrade its build system to cmake 3.22.1
I'm also facing this issue, due to this we are not able to upgrade our project to 0.72.4. Its giving error for only debug variant and release build running successfully. Is there any update on this?
@exploitJ , by the way, how to upgrade the project cmake
@exploitJ , thanks. change the ndkVersion from 24.0.8215888 to 25.2.9519653 , it work for me.
   if (System.properties['os.arch'] == "aarch64") {
        // For M1 Users we need to use the NDK 24 which added support for aarch64
        // ndkVersion = "24.0.8215888"
        ndkVersion = "25.2.9519653"
    } else {
        // Otherwise we default to the side-by-side NDK version from AGP.
        ndkVersion = "21.4.7075529"
    }
                                    
                                    
                                    
                                
I seem to have similar issue in 0.72. A problem occurred configuring project ':react-native-mmkv'.
Could not create task ':react-native-mmkv:configureCMakeDebug[armeabi-v7a]'. "react-native-mmkv": "2.10.2", "react-native": "0.72.4",
@wezter96 did you find a solution for this ☝️
Any updates? I'm having the same problem here and nothing I've tried. solved this problem.
Update: Talking with my colleague, we tried the following solutions: 1 - In your android build.gradle, set the ndk version that your mmkv version was using; 2 - Change the CMake version to compatible with the version mmkv was using 3 - Remove all ndks from C:\Users{your_user}\AppData\Local\Android\Sdk\ndk; 4 - Following this issue: https://github.com/mrousavy/react-native-mmkv/issues/483, it talks about path size, which cannot be long
For me, I followed all these steps, but only after doing the last one, I was able to solve. Also, be carefull using react-native-mmkv-storage, it uses version 23.1.7779620 of ndk, and this could causes some conflicts.
My configurations: react-native: 0.72.6 react-native-mmkv: 2.11.0 Gradle: 8.0 ndk: 25.2.9519653 CMake: 3.22.1
Checkout if you have set _JAVA_OPTIONS
echo $_JAVA_OPTIONS
If so, unset it and try it again:
unset _JAVA_OPTIONS
yarn android
This fixed it for me. I don't know why. I set it because I had some troubles in the past with ipv6.
Try following these steps This worked for me just by uninstalling and installing cmake through the SDK manager.
Are you using react-native-notifications ? Ensure you have followed https://wix.github.io/react-native-notifications/docs/installation-android if so.
build system to cmake 3.22.1
How to do this
ask your manager rahul
Hey - I think this has been fixed in V3 beta.
To compliment, if you're still on v2.x and having the Android issue, just clean the gradle caches with the command ./gradlew clean on your Android native directory, then rebuild, and in case you're in Expo SDK 50 or 51, don't forget to run under a development client (expo-dev-client) build using npx expo run:android. This is more of a building issue, so I hope this works for someone using an older version.
Marc already fixed this on v3 but be aware that requires the new architecture enabled.
Hey, I'm having the same issue even after upgrading to the the latest v3 beta and with the new architecture enabled. My project's using expo SDK 51 an RN 0.74.3. The only time my app builds on android is when I downgrade to v2 and disable fabric.
Any updates/ideas on this? Maybe @oliverloops would have an idea, I'd really appreciate anything at this point
UPDATE: seems like v3 beta 6 and 7 do in fact work, some other packages were failing on my end