包com.google.android.maps不存在?

包com.google.android.maps不存在?,android,Android,我是android studio的新手,正在导入我的一个项目。除了不能包含谷歌地图库外,其他一切都正常,并且出现以下错误: error:package com.google.android.maps does not exist error:package com.google.android.maps does not exist 我见过同一类型问题的不同链接,但它们不起作用。 以下是一些依赖项的详细信息: 项目结构: 格拉德尔 在代码中导入Google地图库: 请帮助解决我的问题。添

我是android studio的新手,正在导入我的一个项目。除了不能包含谷歌地图库外,其他一切都正常,并且出现以下错误:

error:package com.google.android.maps does not exist 
error:package com.google.android.maps does not exist
我见过同一类型问题的不同链接,但它们不起作用。 以下是一些依赖项的详细信息:

项目结构:

格拉德尔

在代码中导入Google地图库:

请帮助解决我的问题。

添加到依赖项:

implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
添加到依赖项中:

implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'

在你的依赖中加上这个梯度

com.google.android.gms:play-services-maps:15.0.1

在你的依赖中加上这个梯度

com.google.android.gms:play-services-maps:15.0.1
使用此选项:-

compile 'com.google.android.gms:play-services-maps:15.0.1'
compile 'com.google.android.gms:play-services-location:15.0.1'
compile 'com.google.android.gms:play-services-auth:15.0.1'
使用此选项:-

compile 'com.google.android.gms:play-services-maps:15.0.1'
compile 'com.google.android.gms:play-services-location:15.0.1'
compile 'com.google.android.gms:play-services-auth:15.0.1'

我刚刚遇到了同样的问题,我需要包括意识服务:


implementation'com.google.android.gms:play services awareness:16.0.0'

我刚刚遇到了同样的问题,我需要包括感知服务:


implementation'com.google.android.gms:play services aware:16.0.0'

根据更新谷歌play services图书馆在更新中面临一些变化

只需添加:

implementation "com.google.android.gms:play-services-maps:X..Y.Z"

根据更新,它运行得很好

谷歌游戏服务图书馆在更新中面临一些变化

只需添加:

implementation "com.google.android.gms:play-services-maps:X..Y.Z"

它工作得很好

在这里尝试以下步骤:在这里尝试以下步骤:这就是我添加上述依赖项的原因:Gradle sync失败:找不到参数的方法实现()[com.google.android.gms:play services maps:15.0.1]在类型为org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler的对象上。有关更多详细信息,请参阅IDE日志(帮助|显示日志)这是我在添加上述依赖项时得到的结果:Gradle sync失败:找不到org.Gradle.api.internal.artifacts.dsl.dependency.DefaultDependencyHandler类型对象上参数[com.google.android.gms:play services maps:15.0.1]的方法实现()。有关更多详细信息,请参阅IDE日志(帮助|显示日志)将上述代码添加到依赖项时出现以下错误:未能解析:com.google.android.gms:play services maps:15.0.1将上述代码添加到依赖项时出现以下错误:未能解析:com.google.android.gms:play services maps:15.0.1我收到无法解析的错误消息com.google.android.gms:play services…删除该依赖项。编译'com.google.android.gms:play services:7.3.0'删除该依赖项并添加上述依赖项。这些是新的依赖项:编译'com.android.support:support-v4:24.2.0'编译'com.android.support:appcompat-v7:24.2.0'编译文件('libs/easyandroidanimationslibrary-v0.5.jar')编译'com.google.android.gms:play services maps:15.0.1'compile'com.google.android.gms:play services location:15.0.1'compile'com.google.android.gms:play services auth:15.0.1'但错误仍然是相同的未能解析com.google.android.gms:play services location…我收到错误消息无法解析com.google.android.gms:play services…删除该依赖项。compile'com.google.android.gms:play services:7.3.0'删除此项并添加上述依赖项。这些是新的依赖项:compile'com.android.support:support-v4:24.2.0'compile'com.android.support:appcompat-v7:24.2.0'编译文件('libs/easyandroidanimationislibrary-v0.5.jar'))编译'com.google.android.gms:play services maps:15.0.1'compile'com.google.android.gms:play services location:15.0.1'compile'com.google.android.gms:play services auth:15.0.1'但错误仍然是相同的,无法解析com.google.android.gms:play services location…这是正确答案b.c地图的所有其他服务都包括在内根据最新的谷歌开发者api设置网站,这是正确答案。根据最新的谷歌开发者api设置网站,地图的所有其他服务都包含在感知字幕中