我们打算像往常一样更新我们的应用程序,但现在Google强制使该应用程序与32位和64位体系结构兼容。我尝试了不同的解决方案,但在所有情况下,我的屏幕快照均出现以下错误。
这是我最后的解决方法
def kinematic():
file = 'Desktop/data/test/spec-001.fits'
hdu = fits.open(file)
Flux = 'flux'
A = 2.31
B = optic
# here is what the script does ...
# here is what the script does ...
if __name__ == '__main__':
kinematics()
我也尝试过此defaultConfig {
...
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
def enableSeparateBuildPerCPUArchitecture = false
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false
include "armeabi-v7a", "arm64-v8a"
}
}
答案 0 :(得分:1)
设置:
universalApk true
,以便将两种架构都包含在通用APK(而非App Bundle)中。包括x86
和/或x86_64
仅对调试版本(仿真器)有用,但它会夸大使用无用的本机程序集的版本。
但对于App Bundle,请参阅The base module build configuration:
拆分块被忽略:
构建应用包时,Gradle会忽略
android.splits
块中的属性。如果要控制您的应用捆绑包支持的配置APK类型,请改用android.bundle
禁用配置APK类型。
默认情况下,它会按abi
进行拆分,但同时也需要两者兼有:两者:*.so
:
android {
// When building Android App Bundles, the splits block is ignored.
splits {...}
// Instead, use the bundle block to control which types of configuration APKs
// you want your app bundle to support.
bundle {
language {
// Specifies that the app bundle should not support
// configuration APKs for language resources. These
// resources are instead packaged with each base and
// dynamic feature APK.
enableSplit = false
}
density {
// This property is set to true by default.
enableSplit = true
}
abi {
// This property is set to true by default.
enableSplit = true
}
}
}
ndk
的构建也已被弃用,请使用cmake
...并确保arm64-v8a
*.so
都已构建(一个可以配置很多,但一点也不在乎关于缺少的库,直到无法链接它们为止)。从armeabi
加载库不被视为“ 64位支持”(已经尝试过)。
答案 1 :(得分:-1)
defaultConfig {
...
ndk {
abiFilters "arm64-v8a", "armeabi-v7a"
}
}
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
}
}