无法在null对象上调用方法containsKey()

Cod*_*ody 10 android google-play-services android-gradle-plugin

当我通过gradle构建我的Android项目时出现此错误.它大概每周发生一次.

FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture snapshot of input files for task ':xxxxxxxx:compileDebugAidl' property 'importDirs' during up-to-date check.
> Cannot invoke method containsKey() on null object

* 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
Run Code Online (Sandbox Code Playgroud)

知道什么可能导致这个错误吗?谢谢

Xav*_*ana 3

从 @tapchicoma 评论到原始问题,问题:Google 服务插件中的 NullPointerException现在被标记为已修复4.2.0

所以,最终的解决方案是更新为:

classpath 'com.google.gms:google-services:4.2.0'
Run Code Online (Sandbox Code Playgroud)