cordova-plugin-googlemaps icon indicating copy to clipboard operation
cordova-plugin-googlemaps copied to clipboard

Support for latest Android and iOS Versions

Open hrhosni opened this issue 3 years ago • 17 comments

Has anyone forked this repo to continue supporting latest Android (12+) and iOS versions?

hrhosni avatar Oct 25 '22 14:10 hrhosni

also desperately looking for working solution for Cordova Android@11

keev-studio avatar Oct 25 '22 16:10 keev-studio

I got this one to work with Android 11.
image

KimberleeDArmstrong avatar Oct 25 '22 17:10 KimberleeDArmstrong

Hi, I am getting zillions of build errors after adding this repo. eeeee

Can you please send what stack versions you are using?

keev-studio avatar Oct 25 '22 20:10 keev-studio

@keev-studio, @hrhosni You can try that fork https://github.com/we-are-joinup/cordova-plugin-googlemaps/ I'm upgrading to [email protected] and seems that everything is working.

lempere avatar Oct 26 '22 15:10 lempere

@keev-studio, @hrhosni You can try that fork https://github.com/we-are-joinup/cordova-plugin-googlemaps/ I'm upgrading to [email protected] and seems that everything is working.

Hi lempere, thank you for your message. I am trying the repo you mentioning. I am getting this error during build fffff What version of gradle are you using for the duild?

keev-studio avatar Oct 27 '22 08:10 keev-studio

That's true, but the error is self explanatory, you need to change:

compile(name:'tbxml-android', ext:'aar') to implementation(name:'tbxml-android', ext:'aar')

inside: platforms/android/cordova-plugin-googlemaps/***-tbxml-android.gradle

lempere avatar Oct 27 '22 08:10 lempere

Hi thank you, I corrected that but now I am getting another group of errors, dont know why. I changed inside: platforms/android/cordova-plugin-googlemaps/***-tbxml-android.gradle as you said, removed and added platform What Gradle, JavaSDK and Node version are you using? gggg

keev-studio avatar Oct 27 '22 08:10 keev-studio

It's seems that the project can find the com.google.android properly. With that screenshot I don't have any clue why. Try running with:

cordova build android --verbose

What Ionic info show:

Ionic:

 ionic (Ionic CLI)  : 4.10.1 (/usr/local/lib/node_modules/ionic)
 Ionic Framework    : ionic-angular 3.9.2
 @ionic/app-scripts : 3.2.4

Cordova:

 cordova (Cordova CLI) : 10.0.0
 Cordova Platforms     : android 11.0.0, browser 6.0.0, ios 6.2.0
 Cordova Plugins       : cordova-plugin-ionic-webview 5.0.0, (and 28 other plugins)

System:

 Android SDK Tools : 26.1.1 (/Users/lempere/Library/Android/sdk)
 ios-deploy        : 1.11.4
 ios-sim           : 8.0.2
 NodeJS            : v12.18.1 (/Users/lempere/.nvm/versions/node/v12.18.1/bin/node)
 npm               : 6.9.0
 OS                : macOS
 Xcode             : Xcode 12.3 Build version 12C33

Another preferences in config.xml, that could help:

<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="32" />    
<preference name="GradlePluginGoogleServicesEnabled" value="true" />
<preference name="GradlePluginGoogleServicesVersion" value="4.3.8" />
<preference name="GradlePluginKotlinEnabled" value="true" />
<preference name="GradlePluginKotlinCodeStyle" value="official" />
<preference name="GradlePluginKotlinVersion" value="1.6.0" />
<preference name="AndroidInsecureFileModeEnabled" value="true" />

If that not helps. Do you have a small project in github to check it out?

lempere avatar Oct 27 '22 09:10 lempere

Hi, I just added your config preferences just to try and getting now some new error referring to google services hhhhh looks like this repo is not compatible somehow, as I am running into error spiral

keev-studio avatar Oct 27 '22 10:10 keev-studio

compileSdkVersion is not specified Try to specify with:

<preference name="android-compileSdkVersion" value="32" />

lempere avatar Oct 27 '22 10:10 lempere

I added to my config but no effect on the error. iiiiii Thank you very much for trying

At the evening I will try the plugin with some simple app without any other plugin to test if it can run in my environment P.S. do you think google play services plugin is needed? In my android@9 environment my app was running with googlemaps plugin without google play services plugin.

keev-studio avatar Oct 27 '22 10:10 keev-studio

Well I see another error. Is a progress. I think will be better if you create a github project with your native configuration and then I can try to build it.

lempere avatar Oct 27 '22 10:10 lempere

Hi, I added minimalistic app with the plugin. No errors, app build at the end but the map is still white / do not load. I created repo with all the files and added you as collaborator if you want to look or build the app. Thank you again for your effort

keev-studio avatar Oct 27 '22 16:10 keev-studio

@keev-studio, @hrhosni You can try that fork https://github.com/we-are-joinup/cordova-plugin-googlemaps/ I'm upgrading to [email protected] and seems that everything is working.

Hi, looks like I got this one working except custom marker icons. any solution for this? thank you EDIT: sorted by changing the path to " file:///android_asset/www/img/YOUR_ICON.webp "

keev-studio avatar Nov 24 '22 17:11 keev-studio

@keev-studio, @hrhosni You can try that fork https://github.com/we-are-joinup/cordova-plugin-googlemaps/ I'm upgrading to [email protected] and seems that everything is working.

This fork worked fine for me after replacing "compile" with "implementation". Great work.

awabbi avatar Nov 28 '22 11:11 awabbi

Hi thank you, I corrected that but now I am getting another group of errors, dont know why. I changed inside: platforms/android/cordova-plugin-googlemaps/***-tbxml-android.gradle as you said, removed and added platform What Gradle, JavaSDK and Node version are you using? gggg

I had the same issue and tried a lot. When creating a blank project which was compiling with the fork "https://github.com/we-are-joinup/cordova-plugin-googlemaps/", I was diving inside it.

As I am migrating from Ionic 5 to Ionic 6, I was also getting everything else nearly as up to date as possible.

The issue states that com.google.android.libraries.maps cannot be found. It was replaced in the CordovaGoogleMaps.java file by using the plugin cordova-androidx-build, which seems to be depreceated for my use. Inside this plugin, the paths are replaced and therefore not working anymore.

["com.google.android.gms.maps", "com.google.android.libraries.maps"]

I have removed the plugin and after replacing the compile with implementation my app started working again and also the google maps plugin works as expected.

Thanks mate :)

nosTa1337 avatar Jan 25 '23 12:01 nosTa1337

That's true, but the error is self explanatory, you need to change:

compile(name:'tbxml-android', ext:'aar') to implementation(name:'tbxml-android', ext:'aar')

inside: platforms/android/cordova-plugin-googlemaps/***-tbxml-android.gradle

Thanks @lempere the repo & the adjustment of implementation got it working for me too.

gbrits avatar May 22 '23 16:05 gbrits