nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
216 stars 80 forks source link

Failed to build plugin @nativescript-community/ui-material-core #369

Closed pkowalezyk closed 2 years ago

pkowalezyk commented 2 years ago

Hello,

When trying to launch my project with "ns run android --emulator", I get the following error :

FAILURE: Build failed with an exception.

Build file '.\platforms\tempPlugin\ui_material_core\build.gradle' line: 108

  • What went wrong: A problem occurred evaluating root project 'ui_material_core'.

    Could not find method compile() for arguments [androidx.appcompat:appcompat:1.2.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • 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 1s Failed to build plugin @nativescript-community/ui-material-core : Error: Command gradlew.bat failed with exit code 1

I recently cleared my npm cache, I didn't have the problem before. Could it be linked ?

Thank you.

farfromrefug commented 2 years ago

@pkowalezyk what version of the plugin are you using ? we are not using compile anymore as it is not supported by gradle 7

pkowalezyk commented 2 years ago

I'm using the 5.3.0 version of the plugin

farfromrefug commented 2 years ago

@pkowalezyk we are at 7.x ;)

pkowalezyk commented 2 years ago

It seems that this issue is linked to recent Nativescript dependencies changes. I solved my issue by updating NativeScript (from 8.01 to 8.2.2).

liamcharmer commented 2 years ago

I have updated the Nativescript (by running ns update).

i now have this issue:

Build file '/Users/liamcharmer/Projects/TraxApp/platforms/tempPlugin/ui_material_core/build.gradle' line: 140

* What went wrong:
A problem occurred evaluating root project 'ui_material_core'.
> Could not find method compile() for arguments [androidx.appcompat:appcompat:1.2.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

javac 15.0.2

EDIT:

When you mention make sure all plugins are updated, simply running ns update is not enough to ensure they are updated. Had to go into package.json and update value

farfromrefug commented 2 years ago

@liamcharmer look at the comment. It is a setup/clean issue