react-native-reanimated: CircleCI failed due to react-native-reanimated (android)

Description

Circle CI lane failed at react-native-reanimated in android

log added


> Configure project :react-native-reanimated
Native libs debug enabled: false
Android gradle plugin: 7.0.3
Gradle: 7.3
building Reanimated2
Checking the license for package NDK (Side by side) 21.4.7075529 in /opt/android/sdk/licenses
License for package NDK (Side by side) 21.4.7075529 accepted.
Preparing "Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)".
"Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)" ready.
Installing NDK (Side by side) 21.4.7075529 in /opt/android/sdk/ndk/21.4.7075529
"Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)" complete.
"Install NDK (Side by side) 21.4.7075529 (revision: 21.4.7075529)" finished.
[CXX1300] CMake '3.18.1' was not found in SDK, PATH, or by cmake.dir property.
[CXX1300] CMake '3.18.1' was not found in SDK, PATH, or by cmake.dir property.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> [CXX1300] CMake '3.18.1' was not found in SDK, PATH, or by cmake.dir property.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Steps to reproduce

Run CircleCI lane in reactnative for android

Snack or a link to a repository

https://snack.expo.io/

Reanimated version

2.10.0

React Native version

0.68.0

Platforms

Android

JavaScript runtime

No response

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Release mode

Device

No response

Device model

No response

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 11
  • Comments: 26 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Okay. That seems to work!

I also found I could install this specific version via Android Studio by going to Tools > SDK Manager, and then select SDK Tools, check the Show Package Details box and select 3.18.1 in addition to 3.22.1 🙂

Hey, just wanted to let you know that this issue has been fixed in 3.0.0-rc.3.

For Reanimated 2 users, we plan to release 2.11 next week.

@carestad Great news!

If anyone else encounters this issue (CMake 3.18 not found), another approach might be to remove this line in node_modules/react-native-reanimated/android/build.gradle: https://github.com/software-mansion/react-native-reanimated/blob/acf7429068c4f801eef41267c2a94b5515ec4ff8/android/build.gradle#L284

Let us know if it works for you.

Hey, just wanted to let you know that this issue has been fixed in 3.0.0-rc.3.

For Reanimated 2 users, we plan to release 2.11 next week.

Hi! Any new on 2.11?

Hey @mahipalsingh-syt!

Reanimated 2.10 requires CMake 3.12+ (see here).

Make sure that it’s installed and available when building app for Android.

Here’s how you can install CMake 3.18.1:

$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.18.1"

How do we move that?

    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
            version "3.18.1"
        }
    }

to?

    externalNativeBuild {
        cmake {
            path "CMakeLists.txt"
        }
    }

image

Thank you so much. This works for me.

Hey @mahipalsingh-syt!

Reanimated 2.10 requires CMake 3.12+ (see here).

Make sure that it’s installed and available when building app for Android.

Here’s how you can install CMake 3.18.1:

$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.18.1"

This resolved my case.

Seeing this too. Why does it only work with CMake 3.18.1 and not newer versions of CMake as well? I have 3.22.1 installed and still get this error.

[CXX1300] CMake '3.18.1' was not found in SDK, PATH, or by cmake.dir property.
[CXX1301] - CMake '3.22.1' found in PATH did not satisfy requested version.
[CXX1300] CMake '3.18.1' was not found in SDK, PATH, or by cmake.dir property.
[CXX1301] - CMake '3.22.1' found in PATH did not satisfy requested version.

This wasn’t an issue before v2.10.0, so rolling back to v2.9.1 fixed this for me.

Also this is mentioned in #3516