dapriett / nativescript-google-maps-sdk

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

Nativescript 6.0 error maps arr #468

Open DevZatokio opened 3 years ago

DevZatokio commented 3 years ago

Missing 'package' key attribute on element package at [com.google.android.gms:play-services-maps:17.0.1]

Solutions remove the following line from your own

<queries>
    <package android:name="com.google.android.apps.maps" />
</queries>
agabrie commented 3 years ago

Missing 'package' key attribute on element package at [com.google.android.gms:play-services-maps:17.0.1]

Solutions remove the following line from your own

<queries>
    <package android:name="com.google.android.apps.maps" />
</queries>

Hi, Where should that be removed from? I know there's a cached file that gets generated but it still causes the project build to fail since it gets overwritten again every time the project builds.

JusticeMuch commented 3 years ago

I'm getting a similar issue with the errors pointing that line in the manifest file .

Error :

Missing 'package' key attribute on element package at [com.google.android.gms:play-services-maps:17.0.1] AndroidManifest.xml:33:9-64 [com.google.android.gms:play-services-maps:17.0.1] /home/justin/.gradle/caches/transforms-2/files-2.1/49353dd520d07e2a59c4a41eb835c2ae/play-services-maps-17.0.1/AndroidManifest.xml Error: Validation failed, exiting

DevZatokio commented 3 years ago

correct @agabrie. Every time it is compiled, that code is generated from "aar", I suppose that it generates the xml files for the compilation of the map.

FranciZ commented 3 years ago

Can confirm that this breaks all our builds suddenly as well. Anyone have a working fix for this?

Seeing the same build braking error:

Missing 'package' key attribute on element package at [com.google.android.gms:play-services-maps:17.0.1]
FranciZ commented 3 years ago

Have you managed to get it working @DevZatokio? Thanks!

vidicj commented 3 years ago

Also breaks our builds, @kefahB or @dapriett any way you can take a look?

tusharr1996 commented 3 years ago

@FranciZ I managed to get it working by downgrading play-services-maps back to 17.0.0 in node_modules/nativescript-google-maps-sdk/platforms/android/include.gradle

replace '+' with '17.0.0'

agabrie commented 3 years ago

@FranciZ I managed to get it working by downgrading play-services-maps back to 17.0.0 in node_modules/nativescript-google-maps-sdk/platforms/android/include.gradle

replace '+' with '17.0.0'

This does seem to fix the app's building issue; however, everything within the app is still broken, I've tried going as far back as version 15.0.1. It just bugs out all the styling and the DOM logic as well.

agabrie commented 3 years ago

Is this specifically an issue with Nativescript 6 builds?

leocrawf commented 3 years ago

@FranciZ I managed to get it working by downgrading play-services-maps back to 17.0.0 in node_modules/nativescript-google-maps-sdk/platforms/android/include.gradle replace '+' with '17.0.0'

This does seem to fix the app's building issue; however, everything within the app is still broken, I've tried going as far back as version 15.0.1. It just bugs out all the styling and the DOM logic as well.

That could possibly be a node-sass issue. you have to rebuild - npm rebuild node-sass

theremon commented 3 years ago

@FranciZ I managed to get it working by downgrading play-services-maps back to 17.0.0 in node_modules/nativescript-google-maps-sdk/platforms/android/include.gradle

replace '+' with '17.0.0'

This worked for me... Thanks a lot!

FranciZ commented 3 years ago

Thanks @tusharr1996! The suggested workaround does the trick. Does anyone know why the error even popped up and if this is a reliable longer term fix?

odedBartov commented 3 years ago

@FranciZ I managed to get it working by downgrading play-services-maps back to 17.0.0 in node_modules/nativescript-google-maps-sdk/platforms/android/include.gradle

replace '+' with '17.0.0'

didn't worked for me. I had to change the google play services version in App_Resources => Android => before-plugins.gradle like you said

dm10fit commented 3 years ago

I'll show you how I made my app working again. In App_Resources > Android, you can insert in you before-plugins.gradle (or create one, if you don't have) the following code:

ext{
  googlePlayServicesVersion = "17.0.0"
}
DevZatokio commented 3 years ago

Solution 1.- node_modules/nativescript-google-maps-sdk/platforms/android/include.gradle replace '+' with '17.0.0' 2.- verification App_Resources/Android/app.gradle

project.ext {
    googlePlayServicesVersion = "17.0.0"
}
android{
...
dependencies{
    def googlePlayServicesVersion = project.ext.googlePlayServicesVersion
    ...
    compile "com.google.android.gms:play-services-location:18.0.0"
    compile "com.google.android.gms:play-services-base:$googlePlayServicesVersion"
    compile 'com.google.android.gms:play-services-gcm:+'
}
}
mdentremont commented 3 years ago

@dm10fit The before-plugins.gradle workaround is working for me, thanks so much!