Open ppetree opened 3 years ago
I'm facing the same issue. Why is this plugin still using the old (and deprecated) android.support library? It should be migrated to AndroidX
I'm pretty sure the multiple_maps branch has AndroidX support.
https://github.com/mapsplugin/cordova-plugin-googlemaps/tree/multiple_maps
Hi @ppetree Did you find a solution? I'm facing the same issue with Android.
My info project:
Cordova Packages:
cli: 10.0.0
common: 4.0.2
create: 3.0.0
lib: 10.0.0
common: 4.0.2
fetch: 3.0.1
serve: 4.0.0
Project Installed Platforms:
I changed the libraries to AndroidX version
"import android.support.annotation.NonNull" --> "import androidx.annotation.NonNull" and "import android.support.v4.content.PermissionChecker" --> "import androidx.core.content.PermissionChecker"
and app builds pretty well, but the map is blank and no errors.
Should this plugin work with Cordova platform 10 ?
I installed in Cordova platform 9 and it's work pretty well.
Try this:
<platform name="android">
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="29" />
<preference name="android-installLocation" value="auto" />
<preference name="android-multiDexEnabled" value="true" />
<preference name="AndroidXEnabled" value="true" />
<preference name="JetifierEnabled" value="true" />
</platform>
<plugin name="cordova-plugin-androidx-adapter" spec="1.1.3" />
<plugin name="@havesource/cordova-plugin-push" spec="1.0.0">
<variable name="SENDER_ID" value="12345678901" />
<variable name="FCM_VERSION" value="18.+" />
</plugin>
Thank you for the reply @ppetree, but this change didn't work, no solution yet.
npm i jetifier --save-dev npx jetify npx cap sync solve this error for me but after that map could'nt load and i got new error:
unhandled Promise rejection: Java exception was raised during method invocation ; Zone: <root> ; Task: Promise.then ; Value: Error: Java exception was raised during method invocation
at capacitorExec (google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:1790)
at execProxy (google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:1924)
at Map.<anonymous> (google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:16126)
at google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:6377
at Array.forEach (<anonymous>)
at Map.trigger (google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:6369)
at Map.set (google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:6335)
at google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:15695
at Array.filter (<anonymous>)
at CordovaGoogleMaps.putHtmlElements (google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:15675) Error: Java exception was raised during method invocation
at capacitorExec (http://192.168.43.105:8100/app/tabs/google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:1790:30)
at execProxy (http://192.168.43.105:8100/app/tabs/google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:1924:21)
at Map.<anonymous> (http://192.168.43.105:8100/app/tabs/google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:16126:7)
at http://192.168.43.105:8100/app/tabs/google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:6377:25
at Array.forEach (<anonymous>)
at Map.trigger (http://192.168.43.105:8100/app/tabs/google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:6369:10)
at Map.set (http://192.168.43.105:8100/app/tabs/google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:6335:12)
at http://192.168.43.105:8100/app/tabs/google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:15695:11
at Array.filter (<anonymous>)
at CordovaGoogleMaps.putHtmlElements (http://192.168.43.105:8100/app/tabs/google-map?lat=35.76880066023837&lng=51.43880367279053&_url=%2Fapp%2Ftabs%2Fplace%2Foffice-management:15675:33)
so all cordova admob plugins not working
ionic cordova plugin add cordova-plugin-androidx-adapter This work for me.
I'm using a cloud build service and including cordova-plugin-googlemaps ver 2.7.1 and I'm getting several Androidx related errors.
I'm submitting a ... (check one with "x")
OS: (check one with "x")
cordova information: (run
$> cordova plugin list
)Current behavior: Build fails with the following errors:
Expected behavior: app builds