仅在 Flutter 版本中存在此问题。我尝试使用 Android Studio Fabric 插件和 Fastlane 命令上传。
尝试使用 Android Studio Fabric 插件拖放上传时,显示错误:
Unable to extract Crashlytics build info from the dropped APK. Please make sure your Crashlytics build tool plugin is installed and enabled.
尝试使用带有命令的 Fastlane 上传时:
fastlane run crashlytics apk_path:"/home/me/app-release.apk" api_token:"xxx" build_secret:"xx"
出现此错误:
[17:26:01]: -------------------------
[17:26:01]: --- Step: crashlytics ---
[17:26:01]: -------------------------
[17:26:01]: Uploading the build to Crashlytics Beta. Time for some ☕️.
[17:26:02]: Shell command exited with exit status 1 instead of 0.
[!] WARN - Crashlytics halted compilation because it can't extract Crashlytics build info from the APK: /home/me/app-release.apk
Exception in thread "main" com.crashlytics.tools.android.exception.PluginException: Distribution upload failed.
at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:667)
at com.crashlytics.tools.android.DeveloperTools.processArgsInternal(DeveloperTools.java:348)
at com.crashlytics.tools.android.DeveloperTools.main(DeveloperTools.java:273)
Caused by: com.crashlytics.tools.android.exception.DistributionException: Crashlytics halted compilation because it can't extract Crashlytics build info from the APK: /home/me/app-release.apk
at com.crashlytics.tools.android.DistributionTasks.uploadDistribution(DistributionTasks.java:64)
at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:665)
... 2 more
我为实施 crashlytics 所采取的步骤:
- 使用说明添加并设置 firebase_crashlytics 作为颤振依赖项:https ://pub.dev/packages/firebase_crashlytics
- 将 Fabric API 密钥添加到 AndroidManifest.xml
- 设置后运行应用程序后,应用程序出现在 Fabric 控制台中,这意味着 Crashlytics 现在设置正常。
- 然后尝试使用 Android Studio 插件和 Fastlane 生成的 APK 上传 Fabric Beta
flutter build apk --release
,导致上述错误。
我错过了什么吗?有没有人成功地将 Flutter 构建上传到 Fabric Beta 并以某种方式解决了 Crashlytics 信息丢失错误?