我正在尝试为我的flutter应用程序创建apk。当在模拟器和设备上运行颤振运行时,它可以工作。
运行时: flutter build apk
获得成功和成功。当复制apk到设备时,它会安装,但随后无法打开。(要打开的安装按钮变灰后,在应用程序绘图中查找应用程序将打开应用程序信息页面)。在多个设备上使用疲惫的apk。
flutter run --发布作品
我遵循了迁移到Androidx的步骤,并检查了所有的包build.gradle,以确保所有包都是compileSdkVersion 28。
我已经尝试过在稳定的、主的和测试版的flutter分支上运行。
运行: flutter build apk --release on(在flutter beta分支上)
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Running Gradle task 'assembleRelease'... 2.8s
✓ Built build/app/outputs/flutter-apk/app-release.apk (21.2MB).编辑:绘图加厚xD。我可以从deeplinks启动应用程序,但使用应用程序图标总是会进入设置。
发布于 2020-05-25 01:23:07
将以下代码添加到
安卓系统中的
android\app\build.gradle {}
buildTypes {
release {
signingConfig signingConfigs.release
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
}
}发布于 2020-05-29 05:13:11
原来我安装了软件包应用可用性,它使用的是compileSdkVersion 27。在该包的build.gradle中将其更改为28似乎可以修复它。
最简单的解决方案就是把这个包换掉。
https://stackoverflow.com/questions/61989562
复制相似问题