Skip to content

Android studio gradle build FAILURE: Build completed with 2 failures.Β #856

@zeevenn

Description

@zeevenn

Description

Open android with android studio, then gradle build fails:

Starting Gradle Daemon...
Gradle Daemon started in 888 ms

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/njr/demo/android/build.gradle' line: 22

* What went wrong:
A problem occurred evaluating root project 'android'.
> Plugin with id 'com.facebook.react' not found.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring root project 'android'.
> compileSdkVersion is not specified. Please add it to build.gradle

* 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.
==============================================================================

BUILD FAILED in 4s

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

βœ” What is the name of the npm package? … react-native-music-library
βœ” What is the description for the package? … Access local music files with metadata
βœ” What is the name of package author? … Your Name
βœ” What is the email address for the package author? … [email protected]
βœ” What is the URL for the package author? … https://github.com/yourusername
βœ” What is the URL for the repository? … https://github.com/yourusername/react-native-music-library
βœ” What type of library do you want to develop? β€Ί Turbo module

Link to repro

https://github.com/nodefinity/react-native-music-library

Environment

node: v20.19.0
macOS: 15.3.2

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