- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
大多数 Android 开发人员一定已经从谷歌那里得到消息,要求在 2019 年 8 月之前更新应用程序以支持 64 位架构。详细说明如下: Ensure that your app supports 64-bit devices
在我的应用程序中,我发现使用了 32 位库,因此我必须更新应用程序以支持 64 位架构。按照上面指南中的建议,我在 build.gradle
文件中添加了以下内容:
ndk.abiFilters = 'armeabi-v7a' 'arm64-v8a' 'x86' 'x86_64'
但是,之后,我在构建应用程序时遇到以下错误:
Error:(35, 0) Could not find method armeabi-v7a() for arguments [arm64-v8a] on DefaultConfig_Decorated{name=main, dimension=null, minSdkVersion=DefaultApiVersion{mApiLevel=16, mCodename='null'}, targetSdkVersion=DefaultApiVersion{mApiLevel=28, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=3, versionName=1.2, applicationId=, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}, mWearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig.
有没有人尝试过将应用程序更新到 64 位?知道如何解决这个问题吗?
最佳答案
可以通过更新build gradle defaultConfig来完成
defaultConfig {
applicationId "my.test.64bitapp"
minSdkVersion 15
targetSdkVersion 26
versionCode 42
versionName "1.0.2"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86' ,'x86_64'
}
或
defaultConfig {
applicationId "com.swypmedia"
minSdkVersion 16
targetSdkVersion 26
versionCode 2
versionName "2.0.2"
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86' ,'x86_64'
}
}
我已经在 android-native 和 react-native 应用上测试过了。构建成功,应用程序正常运行。
关于android - 支持 64 位会导致在 build.gradle 中添加 ndk.abiFilters 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54476308/
我的项目中应用程序的 build.gradle 文件中的 abiFilters 配置是: ndk { abiFilters 'armeabi' } 也就是说,我希望我的apk仅
build.gradle(模块): externalNativeBuild { cmake { path "CMakeLists.txt"
如何在 CodeNameOne 项目中指定 abiFilters(Gradle 应使用 android APK 构建和打包的 native 库的配置)? android { defaultCo
这是我的 build.gradle 文件的一部分: android { //... defaultConfig { //... externalNati
在我的 Flutter 应用程序中,我尝试生成适用于所有设备(无论是 32 位还是 64 位)的 apk。 为此,我将以下几行放在我的 build.gradle 文件中。但它似乎没有为所有架构生成 l
abiFilters 在 android build.gradle defaultConfig block 中设置。 我想从发布 buildType 中排除 x86,但找不到简单的方法来做到这一点 这
我找到了关于 ABI 的文档是,但我找不到任何关于 ndk.abiFilters 属性的确切功能的文档。具体有几个问题: 如果我设置该属性,列出的 ABI 是否不允许运行该应用程序?或者它是允许的 A
我想在 gradle.properties 文件中添加 ndk.abiFilters 属性。现在我在 build.gradle 中有了这个属性。这是我的 build.gradle 的一部分 build
我正在开发一个 Android 应用程序,该应用程序具有使用 ndk-build 构建的 native 库依赖项.反过来,该库取决于我添加到根目录 Android.mk 中的预构建静态库 (.a)如下
大多数 Android 开发人员一定已经从谷歌那里得到消息,要求在 2019 年 8 月之前更新应用程序以支持 64 位架构。详细说明如下: Ensure that your app supports
遵循 google 有关如何使 Android 应用程序兼容 64 位的文档后 here ,我一直在尝试构建的 Android 应用程序包仍然不兼容 64 位。 android studio 项目包含
我是一名优秀的程序员,十分优秀!