How to build NativeScript Vue app compliant with Google Play 64-bit requirement?
Asked Answered
W

2

7

I created my project with the command from the guide:

vue init nativescript-vue/vue-cli-template <project-name>

and I build release APKs with the following command:

tns build android --bundle --release --key-store-path ./my_key.jsk --key-store-password *** --key-store-alias key1 --key-store-alias-password ***

But when I upload the APKs to Google Play Console, I get this error:

This release is not compliant with the Google Play 64-bit requirement

With a link to this page: https://developer.android.com/distribute/best-practices/develop/64-bit.

How can I build release APKs compatible with the new requirements?

Others say I'm supposed to add ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' to my Gradle script. Is that what I should do? And where exactly?

Wellinformed answered 14/5, 2019 at 5:22 Comment(0)
W
12

In App_Resources/Android/app.gradle update your defaultConfig to include:

ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

So your app.gradle should end up looking something like:

android {  
  defaultConfig {  
    generatedDensities = []
    applicationId = "<applicationId>"
    ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
  }  
  aaptOptions {  
    additionalParameters "--no-version-vectors"  
  }  
} 


Waftage answered 14/5, 2019 at 19:19 Comment(0)
C
-1

Per this issue on GitHub, I am using only these filters:

ndk.abiFilters 'armeabi-v7a','arm64-v8a'

x86 and x86_64 are uncommon architectures and my app did not need to support them.

Cuttlefish answered 12/7, 2019 at 13:17 Comment(2)
armeabi-v7a and arm64-v8a are common 64-bit architectures that satisfy the 64-bit requirement. Per the linked issue in GitHub, I still had issues when including the x86 and x86_64 which I explained are uncommon and not needed for all apps depending on the level of support.Cuttlefish
x86 (and thus x86_64) is required for some wearable devices. Removing it off the list doesn't solve the problem, does it? Although, I agree that removing it satisfies Google requirement since the other two happily provide both 32bit and 64bit versions.Primulaceous

© 2022 - 2024 — McMap. All rights reserved.