angular2-nativescript - GooglePlay64 位要求
问题描述
我正在使用 Nativescript 和 Angular 开发移动应用程序。当我将我的 apk 文件上传到 Google Play 商店时,它给了我如下所示的警告消息:此版本不符合 Google Play 64 位要求。从 2019 年 8 月 1 日起,所有版本都必须符合 Google Play 64 位要求。如果对此有一些经验,请分享我如何跟进解决此问题。
谢谢和最好的问候, Zaw Zaw Naing
解决方案
检查您的 APK 或 app bundle 是否有本机代码。在您的项目 App_Resources 目录 app.gradle 和 AndroidManifest.xml 文件中添加几行代码以创建应用程序包。
文件路径:- projectName -> App_Resources -> app.gradle :-
android {
defaultConfig {
generatedDensities = []
applicationId = "com.tcpi.tcpsales"
ndk {
abiFilters.clear()
}
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
splits {
abi {
enable true //enables the ABIs split mechanism
reset() //reset the list of ABIs to be included to an empty string
include 'arm64-v8a', 'armeabi-v7a', 'x86'
universalApk true
}
}
}
project.ext.abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3]
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter("ABI"), 0)
if (baseAbiVersionCode != null) {
output.versionCodeOverride = baseAbiVersionCode * 100017 + variant.versionCode
}
}
}
def settingsGradlePath
if(project.hasProperty("appResourcesPath")) {
settingsGradlePath = "$project.appResourcesPath/Android/settings.gradle";
} else {
settingsGradlePath = "$rootDir/../../app/App_Resources/Android/settings.gradle";
}
def settingsGradleFile = new File(settingsGradlePath);
if(settingsGradleFile.exists())
{
apply from: settingsGradleFile;
}
更改 Android 清单文件中的版本代码,例如:-
文件路径是 projectName -> App_Resources -> src -> AndroidManifest.xml :-
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tcpi.tcpsales"
android:versionCode="2032"
android:versionName="2.32">
推荐阅读
- cmake - 为什么我需要可分离编译?
- javascript - 将图像 URL 转换为文件 - Javascript
- objective-c - 如何为表格 NSTabViewController 选择选项卡
- sql-server - 在 Visual Studio 2015 中构建 SQL CLR 项目
- ruby-on-rails - Ruby on Rails,图像不加载
- cakephp - cakephp 3中相同外键的一个模型中的多个belongTo关系
- jquery - 将按钮放置在 Kendo Grid 的所有行中的列中
- excel - Power 查询合并表任意对任意
- php - 找不到 torophp 类
- java - 如何在 Eclipse 中打开 gwt 设计器?