-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
When running react-native run-android, in a project with this module installed, the build fails with the following error:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '<project directory>\node_modules\react-native-headless-work-manager\android\build.gradle' line: 23
* What went wrong:
A problem occurred evaluating project ':react-native-headless-work-manager'.
> Plugin with id 'maven' 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-headless-work-manager'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
From what I gather, this is because the plugin maven is no longer available in newer versions of Gradle.
According to this thread, that is possible to fix by using maven-publish instead of maven.
I replaced maven with maven-publish in build.gradle, which led to another error:
FAILURE: Build failed with an exception.
* Where:
Build file '<project directory>\node_modules\react-native-headless-work-manager\android\build.gradle' line: 133
* What went wrong:
A problem occurred configuring project ':react-native-headless-work-manager'.
> Could not find method mavenDeployer() for arguments [build_cj7yjhw1weazehvgg64c2lzzv$_run_closure4$_closure15$_closure17@716ecd40] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.
Fixing this is currently beyond my expertise.
Could you please update the module with a build configuration that's compatible with newer Gradle versions?
Metadata
Metadata
Assignees
Labels
No labels