Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin with id 'maven' not found #175

Open
aljimsondev opened this issue Jul 12, 2022 · 6 comments
Open

Plugin with id 'maven' not found #175

aljimsondev opened this issue Jul 12, 2022 · 6 comments

Comments

@aljimsondev
Copy link

aljimsondev commented Jul 12, 2022

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'D:\TypeScript Projects\React-Native\Scheduler\node_modules\react-native-alarm-notification\android\build.gradle' line: 23

* What went wrong:
A problem occurred evaluating project ':react-native-alarm-notification'.
> 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-alarm-notification'.
> 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 54s
@wcosmas
Copy link

wcosmas commented Aug 1, 2022

i'm having a similar issue using gradle 7x

@tbd-farhad
Copy link

I'm having a similar issue

@Amitb01FUB
Copy link

Amitb01FUB commented Sep 11, 2022

Found a fix for that particular problem, as said by @wcosmas maven was remove in Gradle 7.
This whole repo won't compile in Gradle 7, to fix that, you need to make some changes to the buid.gradle file inside the module folder (node_modules\react-native-alarm-notification\android\build.gradle)

line 23: apply plugin: 'maven-publish'

line 43: `apply plugin: 'maven-publish'"

line 112 replace the whole task block:

task androidJavadoc(type: Javadoc) {
        project.configurations.getByName("implementation").setCanBeResolved(true)
        source = android.sourceSets.main.java.srcDirs
        classpath += files(android.bootClasspath)
        classpath += files(project.getConfigurations().getByName('implementation').asList())
        include '**/*.java'
    }

line 145 comment/remove the whole task block:

// task installArchives(type: Upload) {
//     configuration = configurations.archives
//     repositories.mavenDeployer {
//         // Deploy to react-native-event-bridge/maven, ready to publish to npm
//         repository url: "file://${projectDir}/../android/maven"
//         configureReactNativePom pom
//     }
// }

(honestly anything past line 108 is probably not needed for this to run but I didn't check)

after that the app will build with Gradle >=7

@M3BIONIX
Copy link

M3BIONIX commented Oct 2, 2022

I deleted the contents after line 108 then it compiled for me but no alarm notification

@pravinsphinx
Copy link

@emekalites @tuxrace
I'm having a similar issue

@sharifNoor
Copy link

I deleted the contents after line 108 then it compiled for me but no alarm notification 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants