首页 > 解决方案 > 无法解析符号“OnMapReadyCallback”

问题描述

地图活动

所以这是我的build.gradle

android {
compileSdkVersion 25
buildToolsVersion '27.0.3'
defaultConfig {
    applicationId "com.example.christinebpolesti.busartery_driver"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation 'com.android.support:design:25.2.0'
implementation 'com.google.android.gms:play-services:11.0.4'
implementation 'com.google.android.gms:play-services-maps:11.0.4'
implementation 'com.google.android.gms:play-services-location:11.0.4'
implementation 'com.android.support:cardview-v7:25.2.0'
implementation 'com.android.support:recyclerview-v7:25.2.0'
implementation 'com.android.support:multidex:1.0.0'
implementation 'com.firebase:firebase-client-android:2.4.0'
implementation 'com.google.firebase:firebase-auth:11.0.4'
implementation 'com.google.firebase:firebase-database:11.0.4'
implementation 'com.google.firebase:firebase-core:11.0.4'
}
apply plugin: 'com.google.gms.google-services'

前几天还好好的,不知道怎么回事。我什至卸载并再次安装了android studio,因为在此问题之前我的adb没有找到..所以再次安装AS后,我遇到了这个问题。有人可以帮忙吗。

标签: androidgoogle-maps

解决方案


打开您的build.gradle应用并粘贴以下代码:

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


推荐阅读