DEV Community

Davyd NRB
Davyd NRB

Posted on • Edited on

React Native fix android build error "[CXX1428] exception while building Json A problem occurred starting process"

I setup dev environment for my new m1 laptop and faced with weird error when tryied to build React Native 0.72.x New Architecture on Android:

[CXX1428] exception while building Json 
  A problem occurred starting process 
  'command /Users/my/Library/Android/sdk/cmake/3.22.1/bin/cmake'
Enter fullscreen mode Exit fullscreen mode
  1. I was managed to fix it removing all cache:

    rm -rf android/app/build/ android/app/.cxx/
    ./android/gradlew clean -p android
    
  2. and reinstalling some Android SDK components:

2.1 open Android Studio -> open Settings -> then Appearance & Behavior -> System Settings -> Android SDK ->choose SDK Tools -> enable Show Package Details

2.2 And then unmark all CMake, NDK, Command build tools versions:

Image description

2.3 then Apply

2.4 finally install again:

  • latest Command-line Tools
  • 3.22.1 CMake
  • 23.1.7779620 NDK

Top comments (1)

Collapse
 
dhruv_parmar_d32b7cd6f4ae profile image
Dhruv Parmar

rm -rf android/app/build/ android/app/.cxx/
./android/gradlew clean -p android

This even worked for react-native": "0.76.2