【发布时间】:2020-09-11 07:59:34
【问题描述】:
我正在尝试为我的颤振应用创建 apk。它在模拟器和设备上运行颤振运行时工作。
运行时: 颤振构建apk
获取成功和 apk。将 apk 复制到设备时,它会安装但无法打开。 (安装按钮打开后显示为灰色,在应用程序中查找应用程序会打开应用程序信息页面)。在多个设备上安装累了 apk。
flutter run --release 有效
我已按照步骤迁移到 Androidx 并检查了所有包 build.gradle 以确保所有包都是 compileSdkVersion 28。
我尝试在稳定版、master 和 beta 颤振分支上运行。
运行: flutter build apk --release 提供(在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。我可以从深层链接启动应用程序,但使用应用程序图标总是会启动到设置中。
【问题讨论】:
-
这里有问题,有什么解决办法吗??