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?

Mateusz
  • 2,340
  • 25
  • 24

2 Answers2

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


Frank
  • 399
  • 4
  • 16
-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.

Mike Richards
  • 939
  • 3
  • 14
  • 23
  • `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. – Mike Richards Aug 19 '19 at 18:02
  • 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. – Aleksey Gureiev Aug 21 '19 at 05:54