capacitor-community / google-maps

Capacitor Plugin using native Google Maps SDK for Android and iOS.
https://capacitor-community.github.io/google-maps/
MIT License
152 stars 64 forks source link

ionic 6 -android missing com.android.volley:volley #218

Closed medida closed 1 year ago

medida commented 1 year ago

I have a brand new ionic 6 capacitor 4.7 app with a single page

I'm not able to get the project building when using the plugin

"dependencies": { "@angular/common": "^15.0.0", "@angular/core": "^15.0.0", "@angular/forms": "^15.0.0", "@angular/platform-browser": "^15.0.0", "@angular/platform-browser-dynamic": "^15.0.0", "@angular/router": "^15.0.0", "@capacitor-community/google-maps": "^2.0.0-beta.1", "@capacitor/android": "^4.7.0", "@capacitor/app": "4.1.1", "@capacitor/core": "4.7.0", "@capacitor/haptics": "4.1.0", "@capacitor/keyboard": "4.1.1", "@capacitor/status-bar": "4.1.1", "@ionic/angular": "^6.1.9", "ionicons": "^6.0.3", "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" },

its failing with the following information

Execution failed for task ':app:mergeDebugResources'. [capacitor] > Could not resolve all files for configuration ':app:debugRuntimeClasspath'. [capacitor] > Could not find com.android.volley:volley:1.1.1. [capacitor] Searched in the following locations: [capacitor] - https://dl.google.com/dl/android/maven2/com/android/volley/volley/1.1.1/volley-1.1.1.pom [capacitor] - https://repo.maven.apache.org/maven2/com/android/volley/volley/1.1.1/volley-1.1.1.pom [capacitor] - file:/C:/Ionic/Testing stuff/test-01/android/capacitor-cordova-android-plugins/src/main/libs/volley-1.1.1.jar [capacitor] - file:/C:/Ionic/Testing stuff/test-01/android/capacitor-cordova-android-plugins/src/main/libs/volley.jar [capacitor] - file:/C:/Ionic/Testing stuff/test-01/android/app/libs/volley-1.1.1.jar [capacitor] - file:/C:/Ionic/Testing stuff/test-01/android/app/libs/volley.jar [capacitor] Required by: [capacitor] project :app > project :capacitor-community-google-maps > com.google.android.libraries.maps:maps:3.1.0-beta

The installation process was just as instructed npm i --save @capacitor-community/google-maps npx cap sync

Is it because i'm using capacitor > v4

medida commented 1 year ago

I have found a solution so that the project build.

I had to add jcenter to the build.gradle file

allprojects { repositories { google() mavenCentral() jcenter() // this line :) } }