从Android Gradle Plugin 3.2.0
升级到3.3.0-alpha13
后,我看到以下构建错误:
> Task :app:fabricGenerateResourcesDebug FAILED
ERROR - Crashlytics Developer Tools error.
java.lang.IllegalArgumentException: Crashlytics found an invalid API key: null.
Check the Crashlytics plugin to make sure that the application has been added successfully!
Contact [email protected] for assistance.
似乎processDebugGoogleServices
任务在fabricGenerateResourcesDebug
任务之前不再运行。
我正在使用Google服务插件的4.1.0
版本和Fabric插件的1.25.4
。
这是与v4.1.0
插件和AGP 3.3 alpha版本的已知不兼容。解决方法是降级到v4.0.2
插件的google-services
。更多讨论和细节可以在这里找到:https://github.com/firebase/quickstart-android/pull/661。
google-services 4.2.0
也解决了这个问题。
platforms/android/build.gradle
classpath 'com.google.gms:google-services:4.1.0'
至
classpath 'com.google.gms:google-services:4.2.0'
解决问题