У меня есть приложение Android, в котором есть 2 разных проекта firebase, один для сборок DEBUG и один для RELEASE, и у них есть файл google-services.json
соответственно. таким образом, чтобы сборки RELEASE и DEBUG отправлялись в проект myapp-debug
Firebase. Переменная среды GOOGLE_APPLICATION_CREDENTIALS
установлена на сервисную учетную запись JSON для проекта myapp-debug
Firebase.
android {
// ... more configs here
buildTypes/debug {
firebaseAppDistribution {
releaseNotes = "DEBUG"
apkPath = "/path/to/debug.apk"
groups = "qa, devs"
}
buildTypes/release {
firebaseAppDistribution {
appId="myapp-debug" // Force release builds to same debug Firebase project
releaseNotes = "RELEASE"
apkPath = "/path/to/release.apk"
groups = "qa, devs"
}
}
}
}
Однако, когда я создаю приложение и пытаюсь опубликовать sh с помощью команды appDistributionUpload*
I получить ошибку для RELEASE build.
./gradlew clean assembleDebug
./gradlew assembleRelease
./gradlew appDistributionUploadDebug # This command succeeds
./gradlew appDistributionUploadRelease # This one fails with failed to fetch app information
Итак, я не понимаю, что может go здесь не так. Какова роль appId
config внутри блока firebaseAppDistribution
? ⁉️
Для справки, вот журнал для каждой команды appDistributionUpload
.
> Task :ClassifiedsApp:appDistributionUploadDebug
Using APK path specified by the apkPath parameter in your app's build.gradle: /myapp/build/outputs/apk/debug/debug-app.apk.
Uploading APK to Firebase App Distribution...
Getting appId from output of google services plugin
Using credentials file specified by environment variable GOOGLE_APPLICATION_CREDENTIALS: ****
This APK has not been uploaded before.
Uploading the APK.
Uploaded APK successfully 202
Added release notes successfully 200
Added testers/groups successfully 200
App Distribution upload finished successfully!
> Task :ClassifiedsApp:appDistributionUploadRelease FAILED
Using APK path specified by the apkPath parameter in your app's build.gradle: /myapp/build/outputs/apk/release/release-app.apk.
Uploading APK to Firebase App Distribution...
Getting appId from build.gradle file
Using credentials file specified by environment variable GOOGLE_APPLICATION_CREDENTIALS: ****
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ClassifiedsApp:appDistributionUploadRelease'.
> App Distribution failed to fetch app information: [400] Request contains an invalid argument.