software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
9k stars 1.3k forks source link

A problem occurred configuring project ':react-native-reanimated'. > NDK not configured. Download it with SDK manager. Preferred NDK version is '21.0.6113669'. #3176

Open millro04 opened 2 years ago

millro04 commented 2 years ago

Seeing this error when upgrading from to react-native-reanimated version 2.4.1

A problem occurred configuring project ':react-native-reanimated'.

NDK not configured. Download it with SDK manager. Preferred NDK version is '21.0.6113669'.

Is there any documentation for how to properly install NDK for this package now? I can't find anything related to NDK in the docs here. Thanks!

github-actions[bot] commented 2 years ago

Hey! πŸ‘‹

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snippet of code, a snack or a link to a GitHub repository that reproduces the problem?

github-actions[bot] commented 2 years ago

Hey! πŸ‘‹

It looks like you've omitted a few important sections from the issue template.

Please complete Description, Snack or minimal code example, Package versions and Affected platforms sections.

anthlasserre commented 2 years ago

Hey millro04 πŸ‘‹πŸΌ

I was facing the same issue. I managed to get a rid of it by doing this.

  1. Close Android Studio if it's open
  2. Remove installed NDK with rm -rf ~/Library/Android/sdk/ndk/21.4.7075529
  3. Remove your app on your device with adb uninstall YOUR_BUNDLE_ID
  4. Remove your app build with rm -rf android/app/build
  5. Open Android Studio -> Tools -> SDK Manager -> SDK Tools (Tick NDK β˜‘οΈ)
  6. Rebuilded the app from Android Studio
imamabdulazis commented 2 years ago

I have reproduced my current solution.

  1. Opened android studio
  2. Check the details NDK required on the error (Show Package Details)
  3. Download it.
  4. cd android && ./gradlew clean && cd .. && yarn android

NOTE: on my case, I have missing NDK version 21..1.6352463

Screen Shot 2022-07-01 at 7 09 56 PM
syed-qure commented 2 years ago

+1

github-actions[bot] commented 2 years ago

Hey! πŸ‘‹

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

syed-qure commented 2 years ago

For anyone who is having trouble installing ndk version 21.0.6113669 on M1, here's a tracker https://issuetracker.google.com/issues/251482055

chetanbhadarka commented 1 year ago

+1

shafqatbari commented 1 year ago

+1

chetanbhadarka commented 1 year ago

Resolve this issue by removing installed NDK from ".../Android/Sdk/Ndk/" folder and then re-run the project. It'll work as charm.

Have a good day πŸ˜‰

lucianomlima commented 1 year ago

If it's needed to install the NDK (and here it was also needed to install CMake), should this be added in the install docs?

bao-multiIT commented 1 year ago

I'm having this issue on Bitrise...

bored-yuns commented 1 year ago

I was struggling with the same issue with my project.. then this is how I solved it.

  1. Go to "/android/build.gradle"
  2. Change the default NDK version just like the image below

스크란샷 2023-10-12 15 33 30

duyhodev commented 11 months ago

+1

ParkAward commented 11 months ago

+1

firstpersoncode commented 10 months ago

so how do you guys solve this to be exactly?

Sakib-203-15-3883 commented 8 months ago

You can open Android Studio, navigate to Tools > SDK Manager, switch to the SDK Tools tab, and check if the NDK is installed. If it's installed, you can try uninstalling and reinstalling it to ensure a clean installation. in my case it was not installed, I just installed it Currently NDK version is 25.1.8937393 for React Native Reanimated.

PhillipMwaniki commented 6 months ago

Seems like we no longer have the luxury to select different versions in the latest Android Studio

image
imamabdulazis commented 6 months ago

@PhillipMwaniki β€œshow package details” https://github.com/software-mansion/react-native-reanimated/issues/3176#issuecomment-1172293699

abhiche commented 4 months ago

I was getting the same error after upgrading this library from v1 to v2

NDK not configured. Download it with SDK manager. Preferred NDK version is '21.0.6113669'.

Reanimated : 2.17.0 React Native: 0.64.1 Node JS: v16.19.0 Machine: Apple M2 Sonoma

I managed to fix it using the steps below.

  1. Install the version closest to the Preferred NDK version from Android Studio SDK Manager, in my case it was 21.4.7075529
  2. cd into ndk folder, eg: /Users/abhi/Library/Android/sdk/ndk
  3. Create a copy of closest version and renaming it with required version cp -r 21.4.7075529 21.0.6113669
  4. Replace all occurrences of text 21.4.7075529 with 21.0.6113669 in 21.0.6113669/package.xml and 21.0.6113669/source.properties files
  5. Delete node_modules and android build files
  6. yarn && npx react-native run-android

I also faced an issue with i18n during build. Fixed it by commenting the minSdkVersion and patch updating it.

image

build.gradle

image

gradle-wrapper.properties

image

SDK Manager

image
bbrainttech commented 2 months ago

Seems like we no longer have the luxury to select different versions in the latest Android Studio image

You need to toggle this checkbox Show Package Details image

balkiesAlbrahem commented 2 months ago

you should make the following change enter to =====> android\app\build.gradle and change android { ndkVersion = "25.1.8937393"

} and sure to download from SDK Tool -NDK- or Update it