找不到 play-services-ads-identifier-17.0。0.jar

Could not find play-services-ads-identifier-17.0.0.jar

当我在 android studio 中尝试 ro 运行 android 应用程序时,出现此错误:

Execution failed for task ':app:compileDebugKotlin'. Could not resolve all artifacts for configuration ':app:debugCompileClasspath'. Could not find play-services-ads-identifier-17.0.0.jar (com.google.android.gms:play-services-ads-identifier:17.0.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-ads-identifier/17.0.0/play-services-ads-identifier-17.0.0.jar Possible solution:

我将此行添加到 build.gradle 文件,但它不起作用。

implementation "com.google.android.gms:play-services-ads-identifier:17.0.0"

已通过更新 gradle 和 android studio 解决。

我将其添加到 gradle 并解决了!!

实施“com.google.android.gms:play-services-ads-identifier:17.0.0”