【发布时间】:2020-01-24 08:57:11
【问题描述】:
我从 2 天开始就一直在尝试上传 apk。每次我上传 apk 时都会出现 64 位错误。我知道 Stackoverflow 上还有其他问题问同样的问题。但他们中的大多数人都在说颤振的解决方案。
根据Google Documentation我使用APK Analyze发现我的项目中有.so文件。
根据我添加的文档 ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'。但我仍然得到同样的错误。
请检查我的 build.gradle 代码。
android {
compileSdkVersion 29
buildToolsVersion '29.0.0'
defaultConfig {
applicationId "com.XXXXX"
minSdkVersion 15
targetSdkVersion 29
versionCode 237
versionName "3.3.20"
multiDexEnabled true
//ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86_64' - not worked
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
applicationVariants.all { variant ->
variant.resValue "string", "versionName", variant.versionName
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
flavorDimensions "default"
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
}
productFlavors {
production {
applicationId 'com.XXXXX'
}
staging {
applicationId 'com.XXXXX.staging'
}
}
// Add this block and enable/disable the parameters as follows
bundle {
density {
// Different APKs are generated for devices with different screen densities; true by default.
enableSplit true
}
abi {
// Different APKs are generated for devices with different CPU architectures; true by default.
enableSplit true
}
language {
// This is disabled so that the App Bundle does NOT split the APK for each language.
// We're gonna use the same APK for all languages.
enableSplit false
}
}}
请帮我解决问题。
创建签名包 apk 后,.so 文件在 armeabi-v7a、arm64-v8a、x86、x86_64 文件夹中显示相同。
【问题讨论】:
-
任何外部 SDK 或库使用 ?有模块吗?
-
@IntelliJAmiya 我正在使用一个外部库和两个 aar gradle lib
-
@TomazMazej:我不想要 Flutter 解决方案
标签: android android-studio google-play 64-bit google-play-console