cordova-plugin-googlemaps: conflict with OneSignal-Cordova-SDK
I’m submitting a … (check one with “x”)
- question
- any problem or bug report
OS: (check one with “x”)
- Android
- iOS
- Browser
cordova information: (run $> cordova plugin list)
[root@code mobile-user]# cordova plugin list
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-apprate 1.4.0 "AppRate"
cordova-plugin-badge 0.8.8 "Badge"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-googlemaps 2.6.0 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.0.1 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
cordova-plugin-nativestorage 2.3.2 "NativeStorage"
cordova-plugin-request-location-accuracy 2.2.3 "Request Location Accuracy"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova.plugins.diagnostic 4.0.12 "Diagnostic"
onesignal-cordova-plugin 2.4.6 "OneSignal Push Notifications"
If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)
@ionic-native/core": "^4.4.0"
"@ionic-native/google-maps": "^4.15.1" :
Current behavior: Can not build for android (tried with cordova android 7 and 8) I am getting GOOGLE_MAPS_ANDROID_API_KEY not provided, while I added preferences values to config.xml <preference name="GOOGLE_MAPS_ANDROID_API_KEY" value="***" /> <preference name="GOOGLE_MAPS_IOS_API_KEY" value="***" />
Expected behavior: To build android apk successfully
Related code, data or error log (please format your code or data): BUILD FAILED in 10s /root/projects/busvibe/mobile-user/platforms/android/gradlew: Command failed with exit code 1 Error output: Note: /root/projects/busvibe/mobile-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /root/projects/busvibe/mobile-user/platforms/android/app/src/main/AndroidManifest.xml:12:66-112 Error: Attribute meta-data#com.google.android.geo.API_KEY@value at AndroidManifest.xml:12:66-112 requires a placeholder substitution but no value for <GOOGLE_MAPS_ANDROID_API_KEY> is provided. /root/projects/busvibe/mobile-user/platforms/android/app/src/main/AndroidManifest.xml Error: Validation failed, exiting
FAILURE: Build failed with an exception.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (16 by maintainers)
Just for info if anyone need, I was having the same issue even following the instructions here.
Then I tried to run
pod install --verboseand the console log:So, following the instruction I updated with
pod repo updateand it worked! To ensure, I removed the plugin and added again:Thanks!
Since
cordova-ios@4.4or below specifiesplatform :ios, '8.0'inplatforms/ios/Podfile, you can not useGoogleMaps@3.xPod. Because Google drops supports.However
cordova-ios@4.4or below versions are still active in many projects. That’s why I specified two ways.https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/a5155cd34f0ea02b2ee4d37177504a4bdb5d5cca/plugin.xml#L474-L482
works for
cordova-ios@4.4or below versions.works for
cordova-ios@5.xwithcordova-cli@9.As the message,
GoogleMaps@~> 3.1.0 is already.