找不到 GeoApiContext 和 DirectionsApiRequest

GeoApiContext and DirectionsApiRequest not found

要在我的 Android 应用程序中使用这两个 类 需要哪些依赖项?下面是我当前的 build.gradle 文件:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.volley:volley:1.1.0'
    //noinspection GradleCompatible
    implementation 'com.android.support:design:26.1.0'
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.google.maps.android:android-maps-utils:1.0.2'
    implementation 'androidx.legacy:legacy-support-v13:1.0.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'

    //UI Dependencies
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.navigation:navigation-fragment:2.2.2'
    implementation 'androidx.navigation:navigation-ui:2.2.2'

    //testing frameworks
    implementation 'junit:junit:4.13'
    testImplementation 'com.android.support.test:rules:1.0.2'
    androidTestImplementation 'com.android.support.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test:core:1.2.0'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    testImplementation "org.robolectric:robolectric:4.2.1"

    //API Dependencies
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.github.GrenderG:Toasty:1.4.2'
    implementation 'com.squareup.retrofit2:retrofit:2.8.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.7.0'

    //Directions API
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
}

但是,我仍然得到 "Cannot resolve symbol: GeoApiContext" 和 "Cannot resolve symbol: DirectionsApiRequest"。

我已经添加了 Google Maven 存储库,但是没有成功:

repositories {
    maven {
        url 'https://maven.google.com/'
        name 'Google'
    }

感谢您的帮助。

想通了。

我缺少依赖性 implementation 'com.google.maps:google-maps-services:0.1.3' 在我的 build.gradle 文件中