nativescript-google-maps-sdk icon indicating copy to clipboard operation
nativescript-google-maps-sdk copied to clipboard

Nativescript 6.0 error maps arr

Open DevZatokio opened this issue 3 years ago • 16 comments

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>

DevZatokio avatar Apr 28 '21 14:04 DevZatokio

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.

agabrie avatar Apr 29 '21 14:04 agabrie

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

JusticeMuch avatar Apr 29 '21 14:04 JusticeMuch

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.

DevZatokio avatar Apr 30 '21 12:04 DevZatokio

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 avatar Apr 30 '21 13:04 FranciZ

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

FranciZ avatar Apr 30 '21 13:04 FranciZ

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

vidicj avatar Apr 30 '21 13:04 vidicj

@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'

tusharr1996 avatar Apr 30 '21 13:04 tusharr1996

@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 avatar Apr 30 '21 13:04 agabrie

Is this specifically an issue with Nativescript 6 builds?

agabrie avatar Apr 30 '21 13:04 agabrie

@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

leocrawf avatar Apr 30 '21 19:04 leocrawf

@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!

theremon avatar May 01 '21 10:05 theremon

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?

FranciZ avatar May 04 '21 11:05 FranciZ

@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

odedBartov avatar May 09 '21 07:05 odedBartov

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"
}

dm10fit avatar May 11 '21 12:05 dm10fit

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:+'
}
}

DevZatokio avatar May 11 '21 15:05 DevZatokio

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

mdentremont avatar May 12 '21 13:05 mdentremont