skip to Main Content

I shifted to M1 machine and getting this error for expo-av, I couldn’t find anything related to this error, it is happening only in android…

Command used to run project: npx react-native run-android
Build Error:

> Task :expo-av:configureCMakeDebug[arm64-v8a] FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':expo-av:configureCMakeDebug[arm64-v8a]'.
> [CXX1405] exception while building Json A problem occurred starting process 'command '/Users/macbook/Library/Android/sdk/cmake/3.18.1/bin/cmake''

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

Package.json

"expo": "^46.0.0",
"expo-av": "~12.0.4",
"react-native": "0.69.6",

Output of npx react-native info:

info Fetching system and libraries information...
System:
    OS: macOS 12.5
    CPU: (8) arm64 Apple M1
    Memory: 227.61 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 19.0.1 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 7.24.2 - ~/Desktop/project/node_modules/.bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 29, 30, 31, 33
      Build Tools: 30.0.3, 31.0.0, 33.0.0
      System Images: android-31 | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode: 14.1/14B47b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.17 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.0.0 => 18.0.0 
    react-native: 0.69.6 => 0.69.6 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

It might be a gradle problem? I’m not sure…

Android Studio config:

SDK Platforms
  Android Tiramisu (Tiramisu)
    -> Android SDK Platform 33 (installed)
    -> Google APIs ARM 64 v8a System Image (installed)
    -> Google Play ARM 64 v8a System Image (installed)
  Android 12.0 (S)
    -> Android SDK Platform 31 (installed) // as per my project's build.gradle
    -> Google APIs ARM 64 v8a System Image (installed)
    -> Google Play ARM 64 v8a System Image (installed)
  Android 11.0 (R)
    -> Android SDK Platform 30 (installed)
  Android 10.0 (Q)
    -> Android SDK Platform 29 (installed)

SDK Tools
  -> 33.0.0 (installed)
  -> 31.0.0 (installed)
  -> 30.0.3 (installed)
  NDK (side by side)
    -> 21.4.7075529 (installed)
    -> 24.0.8215888 (installed) // as per my project's build.gradle
  Android SDK Command-line Tools (latest)
    -> Android SDK Command-line Tools (latest)  8.0 (installed)
  CMake
    -> 3.22.1  (installed)
    -> 3.18.1  (installed)
  Android Emulator  31.3.13 (installed)
  Android SDK Platform-Tools   33.0.3 (installed)

I tried: cd android/ && ./gradlew clean && cd .. && npx react-native run-android but not luck…

UPDATE – 1:

I was able to reproduce the exact same build error using the following steps and I have also shared a reproducible repo: https://github.com/theartificialguy/rn-m1

1) on an M1 MacBook -> npx react-native init m1project --version 0.69.6
2) npx react-native run-android -> It was working.
3) npx install-expo-modules@latest
4) npx expo install expo-av
5) npx react-native run-android -> Got the same build error as mentioned in the title.

Can someone shed some light on this issue?

If anyone need more info I can provide, just ask what you need…

2

Answers


  1. Open Android Studio -> SDK Manager -> SDK Tools -> CMake
    uncheck the check options and install it again and try to build it again

    Login or Signup to reply.
  2. Dont update manually expo

    get the previous expo version and install that version .

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search