Search code examples
androidreact-nativeandroid-ndkreact-native-reanimatedmobli

NDK is already installed but I got this error in react native cli


error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081 [CXX1101] NDK at C:\Users\User\AppData\Local\Android\Sdk\ndk\21.4.7075529 did not have a source.properties file [CXX1101] NDK at C:\Users\User\AppData\Local\Android\Sdk\ndk\21.4.7075529 did not have a source.properties file

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':react-native-reanimated'.

NDK is not installed

what should I do? I only run one project and another projects are always facing these eror


Solution

  • try to set ndk version in build.gradle file

    android {
            ndkVersion '21.3.6528147'
        }