首页 > 解决方案 > How to build NativeScript Vue app compliant with Google Play 64-bit requirement?

问题描述

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?

标签: androidbuildgoogle-play-consolenativescript-vue

解决方案


App_Resources/Android/app.gradle更新您的 defaultConfig 以包括:

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

所以你的 app.gradle 最终应该看起来像:

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



推荐阅读