Firebase Crashlytics Minify R8 Android

20

该应用程序在正常情况下运行良好,但当我尝试实现minify和R8时,会引发以下错误。

* What went wrong:
Execution failed for task ':app:uploadCrashlyticsMappingFileAlpha'.
> Failed to calculate the value of task ':app:uploadCrashlyticsMappingFileAlpha' property 'googleServicesResourceRoot'.
   > Could not get unknown property 'intermediateDir' for task ':app:processAlphaGoogleServices' of type com.google.gms.googleservices.GoogleServicesTask.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:uploadCrashlyticsMappingFileAlpha'.

//..... More Error Line

我遇到了上述错误,但是完全不知道发生了什么。

buildTypes {
        getByName("debug") {
            applicationIdSuffix = ".sandbox"
            debuggable true
        }
        alpha {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            versionNameSuffix ".alpha"
        }
}

这是我使用的上面的代码,我正在尝试构建阿尔法,但是当我调试时可以正常工作。

1个回答

31

更新

Google Play服务有一个新版本,看起来它解决了这个问题。你可以使用 4.3.13 版本,他们为此恢复了缺失的功能。


原答案

请将Google Play服务降级到4.3.10。我不知道背后的原因,但是看起来4.3.12不兼容。

这是我在Google问题跟踪器上创建的问题:

https://issuetracker.google.com/issues/237071883


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接