Flutter APK版本无法上传到Fabric Beta

时间:2019-06-26 08:31:26

标签: flutter google-fabric crashlytics-android crashlytics-beta fabric-beta

仅Flutter构建存在此问题。我尝试使用Android Studio Fabric插件和Fastlane命令进行上传。

在尝试使用Android Studio Fabric插件拖放进行上传时,显示错误,并显示: java.sql.CallableStatement

当尝试使用Fastlane通过以下命令上传时: Unable to extract Crashlytics build info from the dropped APK. Please make sure your Crashlytics build tool plugin is installed and enabled.

出现此错误:

fastlane run crashlytics apk_path:"/home/me/app-release.apk" api_token:"xxx" build_secret:"xx"

我为实现crashlytics所采取的步骤:

  • 使用以下方法添加并设置firebase_crashlytics作为抖动依赖项 说明:https://pub.dev/packages/firebase_crashlytics
  • 将Fabric API密钥添加到AndroidManifest.xml
  • 设置后运行该应用程序后,该应用程序将显示在Fabric控制台中,这意味着Crashlytics现在设置良好。
  • 然后尝试使用[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 生成的APK上传Fabric Beta,同时尝试Android Studio插件和Fastlane,导致上述错误。

我错过了什么吗? 是否有人成功将Flutter版本上传到Fabric Beta并以某种方式解决了Crashlytics缺少信息的错误?

2 个答案:

答案 0 :(得分:1)

在build.gradle文件中,确保将值分配给versionCode和versionName:

versionCode 1
versionName "1.0"

答案 1 :(得分:0)

遇到类似问题到达Fabric后,问题出在gradle版本上。

在gradle文件中切换到此:

classpath'com.android.tools.build:gradle:3.2.1'