4

./gradlew appDistributionUploadRelease使用终端中的 gradle 命令将应用发布 apk 上传到 firebase 时出现问题。这个问题是在我更新了一些构建工具classpath 'com.google.gms:google-services:4.3.4'之后开始classpath 'com.android.tools.build:gradle:4.0.1'./gradlew appDistributionUploadRelease,我在构建终端中遇到错误

> Task :app:validateSigningRelease UP-TO-DATE
> Task :app:packageRelease UP-TO-DATE

> Task :app:appDistributionUploadRelease FAILED
Found APK at /home/****/agent/workspace/project-name/app/build/intermediates/incremental/packageRelease/tmp/app-release.apk.
Uploading APK to Firebase App Distribution...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:appDistributionUploadRelease'.
> Missing information about the APK path. Please check that an APK path was passed in and try agai

我尝试将构建 gradle 中的 apkPath 明确指定为已确认发布的路径,但仅使用更新的路径我仍然收到此错误

> Task :app:validateSigningRelease UP-TO-DATE
> Task :app:packageRelease UP-TO-DATE

> Task :app:appDistributionUploadRelease FAILED
Found APK at build/outputs/apk/release/app-release.apk.
Uploading APK to Firebase App Distribution...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:appDistributionUploadRelease'.
> Missing information about the APK path. Please check that an APK path was passed in and try again

我不知道如何解决这个问题,因为我确信 apk 存在于指定的路径中,并且当手动上传到 firebase 时,apk 可以工作。帮助将不胜感激。

4

1 回答 1

4

Figured out the issue, this classpath 'com.google.firebase:firebase-appdistribution-gradle:2.0.1' was missing from the dependencies section in my project level build.gradle. Follow instructions here to the letter folks.

于 2020-12-11T15:19:17.093 回答