gpt4 book ai didi

android - Flutter build split 不会创建 x86 apk?

转载 作者:行者123 更新时间:2023-12-04 23:48:35 31 4
gpt4 key购买 nike

Flutter 不会创建 x86 apk,但会创建其他三个 apk。
最近发布的 Android 应用程序 firebase 崩溃提示 x86 找不到“libflutter.so” .所以我想我们已经在那个 x86 lib 文件夹中发布了一个 bundle 的应用程序,或者可能没有创建相关的 lib,所以发生了崩溃。我尝试使用 flutter build apk --split-per-abi 在本地计算机中创建拆分 apk它创建了三个文件 “arm64-v8a”、“armeabi-v7a”、“x86_64”但是 x86 apk 未创建 我不知道或我错过了任何配置?
帮帮我。提前致谢!

maclap@root flutter-app-v3 % flutter build apk --split-per-abi

Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

Removed unused resources: Binary resource data reduced from 1109KB to 1052KB: Removed 5%
Removed unused resources: Binary resource data reduced from 1109KB to 1052KB: Removed 5%
Removed unused resources: Binary resource data reduced from 1109KB to 1052KB: Removed 5%
Running Gradle task 'assembleRelease'... 68.0s
✓ Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (18.1MB).
在,android/app/build.gradle
defaultConfig {
...
ndk {
abiFilters "arm64-v8a", "armeabi-v7a", "x86", "x86_64"
}
}
enter image description here

最佳答案

flutter build apk --split-per-abi只生成三个apk文件source

1 - app-armeabi-v7a-release.apk (ARM 32-bit)
2 - app-arm64-v8a-release.apk (ARM 64-bit)
3 - app-x86_64-release.apk (x86 64-bit)
Flutter 目前不支持为 x86 Android 构建 Source
解决方案:您可以运行 flutter build apk命令生成 app-release.apk fat单个 APK 的 APK 在多个架构上运行

关于android - Flutter build split 不会创建 x86 apk?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71567473/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com