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

Could not find method compile() for arguments [com.google.android.gms:play-services-maps:+] #496

Open
pvcoelho opened this issue Apr 18, 2022 · 3 comments

Comments

@pvcoelho
Copy link

FAILURE: Build failed with an exception.

  • Where:
    Build file '/.../platforms/tempPlugin/nativescript_google_maps_sdk/build.gradle' line: 105

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

Could not find method compile() for arguments [com.google.android.gms:play-services-maps:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

BUILD FAILED in 5s
Failed to build plugin nativescript-google-maps-sdk :
Error: Command ./gradlew failed with exit code 1


package.json:

{
"name": "@nativescript/...",
"main": "main.js",
"version": "7.0.6",
"author": "NativeScript Team oss@nativescript.org",
"description": "NativeScript Application",
"license": "SEE LICENSE IN ",
"publishConfig": {
"access": "public"
},
"keywords": [
"nativescript",
"mobile",
"angular",
"{N}",
"template"
],
"repository": "",
"bugs": {
"url": "https://github.com/NativeScript/NativeScript/issues"
},
"dependencies": {
"@angular/animations": "~10.1.0",
"@angular/common": "~10.1.0",
"@angular/compiler": "~10.1.0",
"@angular/core": "~10.1.0",
"@angular/forms": "~10.1.0",
"@angular/platform-browser": "~10.1.0",
"@angular/platform-browser-dynamic": "~10.1.0",
"@angular/router": "~10.1.0",
"@nativescript/angular": "~10.1.0",
"@nativescript/core": "~7.0.0",
"@nativescript/datetimepicker": "2.0.4",
"@nativescript/firebase": "11.1.3",
"@nativescript/geolocation": "^7.0.0",
"@nativescript/theme": "~3.0.0",
"@nstudio/nativescript-floatingactionbutton": "^3.0.4",
"@nstudio/nativescript-tracking-transparency": "^1.0.0",
"nativescript-advanced-webview": "^6.0.0",
"nativescript-google-maps-sdk": "3.0.2",
"nativescript-phone": "^3.0.2",
"nativescript-ui-listview": "^9.0.4",
"nativescript-ui-sidedrawer": "^9.0.3",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.6.0",
"zone.js": "~0.11.1"
},
"devDependencies": {
"@angular/compiler-cli": "~10.1.0",
"@nativescript/android": "7.0.1",
"@nativescript/ios": "7.0.5",
"@nativescript/types": "~7.0.0",
"@nativescript/webpack": "~3.0.0",
"@ngtools/webpack": "~10.1.0",
"typescript": "~4.0.0"
},
"private": "true",
"readme": "NativeScript Application"
}

@mobil-app-explorer
Copy link

I have been using this plugin for almost a year now, and have enjoyed using it, but just today after I tried to rebuild the app from scratch, first it complained gradle needs java 11, after switching to java 11, then I am experiencing the same error for this plugin (A problem occurred evaluating root project 'nativescript_google_maps_sdk') . Any help will be appreciated, thanks!

@mobil-app-explorer
Copy link

@pvcoelho Just found workaround on this, the error is because this plugin has one dependency defined as
compile "com.google.android.gms:play-services-maps:$googlePlayServicesVersion"
but "compile" is obsolate or removed from gradle 7+, just replace "compile" with "implementation", and that fixed error for my project, you can apply the workaround in file "\node_modules\nativescript-google-maps-sdk\platforms\android\include.gradle"; Need to confirm with plugin author(s) to see if "implementation" is the right replacement or "compileOnly" or "runtimeOnly" is.

@Bernardmyburgh5
Copy link

Has there been update in getting a permanent fix in for this issue?

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

3 participants