Skip to content

Build fails on Android for release build #784

@firmanjml

Description

@firmanjml

Description

Hi, I’ve been working with audio using this library and have really enjoyed it. Everything worked perfectly during development, but when I tried building the application in Android Studio, I kept encountering this error message, even on two different machines.

I’ve already tried clearing the Gradle cache, deleting the node_modules, and reverting to older versions, but the issue still persists.

The project folder name is replaced to ****** for this issue purpose

ninja: error: mkdir(src/main/cpp/audioapi/CMakeFiles/react-native-audio-api.dir/C_/Users/firmanjml/Desktop/******/node_modules/react-native-audio-api): No such file or directory

More detailed error message

Execution failed for task ':react-native-audio-api:buildCMakeRelWithDebInfo[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `C:\Users\firmanjml\Desktop\******\node_modules\react-native-audio-api\android\.cxx\RelWithDebInfo\6a2943x3\arm64-v8a'
  [0/2] Re-checking globbed directories...
  ninja: build stopped: .
  
  C++ build system [build] failed while executing:
      @echo off
      "C:\\Users\\firmanjml\\AppData\\Local\\Android\\Sdk\\cmake\\3.22.1\\bin\\ninja.exe" ^
        -C ^
        "C:\\Users\\firmanjml\\Desktop\\******\\node_modules\\react-native-audio-api\\android\\.cxx\\RelWithDebInfo\\6a2943x3\\arm64-v8a" ^
        react-native-audio-api
    from C:\Users\firmanjml\Desktop\******\node_modules\react-native-audio-api\android
  ninja: error: mkdir(src/main/cpp/audioapi/CMakeFiles/react-native-audio-api.dir/C_/Users/firmanjml/Desktop/******/node_modules/react-native-audio-api): No such file or directory

* 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.
Ask Gemini

Versions:
react-native: 0.81.4
react-native-audio-api: 0.9.3
os: windows 11

Steps to reproduce

  1. build release apk

Snack or a link to a repository

React Native Audio API version

0.9.3

React Native version

0.81.4

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Fabric (New Architecture)

Build type

Release app & production bundle

Device

Real device

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions