Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nativescript 6.0 error maps arr #468

Open
DevZatokio opened this issue Apr 28, 2021 · 16 comments
Open

Nativescript 6.0 error maps arr #468

DevZatokio opened this issue Apr 28, 2021 · 16 comments

Comments

@DevZatokio
Copy link

DevZatokio commented Apr 28, 2021

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
Copy link

agabrie commented Apr 29, 2021

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
Copy link

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
Copy link
Author

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
Copy link

FranciZ commented Apr 30, 2021

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
Copy link

FranciZ commented Apr 30, 2021

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

@vidicj
Copy link

vidicj commented Apr 30, 2021

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

@tusharr1996
Copy link

@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
Copy link

agabrie commented Apr 30, 2021

@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
Copy link

agabrie commented Apr 30, 2021

Is this specifically an issue with Nativescript 6 builds?

@leocrawf
Copy link

leocrawf commented Apr 30, 2021

@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
Copy link

theremon commented May 1, 2021

@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
Copy link

FranciZ commented May 4, 2021

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
Copy link

odedBartov commented May 9, 2021

@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
Copy link

dm10fit commented May 11, 2021

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
Copy link
Author

DevZatokio commented May 11, 2021

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests