dapriett / nativescript-google-maps-sdk

Cross Platform Google Maps SDK for Nativescript
MIT License
244 stars 164 forks source link

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

Open pvcoelho opened 2 years ago

pvcoelho commented 2 years ago

FAILURE: Build failed with an exception.

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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