我正在将基于Google 文档的“Firebase App Distribution”添加到我的 Android 应用程序中,但在运行appDistributionUploadRelease
Gradle 任务后,我收到以下错误消息:
10:18:03 PM: Executing task 'appDistributionUploadRelease'...
Executing tasks: [appDistributionUploadRelease] in project C:\Users\mohsenoid\development\***\***-Android
> Task :app:appDistributionUploadRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:appDistributionUploadRelease'.
> App Distribution found more than 1 output file for this variant. Please contact firebase-support@google.com for help using APK splits with App Distribution.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 19s
1 actionable task: 1 executed
10:18:23 PM: Task execution finished 'appDistributionUploadRelease'.
仅供参考,我的应用根据不同的 ABI 拆分了输出 APK:
splits {
// Configures multiple APKs based on ABI.
abi {
// Enables building multiple APKs per ABI.
enable true
// By default all ABIs are included, so use reset() and include to specify that we only
// want APKs for x86, armeabi-v7a, and mips.
reset()
// Specifies a list of ABIs that Gradle should create APKs for.
include "armeabi-v7a", "arm64-v8a"
// Specifies that we want to also generate a universal APK that includes all ABIs.
universalApk true
}
}
我想这就是为什么这个插件对上传哪个 APK 感到困惑的原因。
以下是构建后创建的 apk 列表:
app-arm64-v8a-release.apk
app-armeabi-v7a-release.apk
app-universal-release.apk
更新:
我浏览了插件源代码并注意到有一个未记录的属性apkPath
,我应该设置它,但仍然没有成功。