【问题标题】:Android Cannot resolve symbol PlusDomainsAndroid 无法解析符号 PlusDomains
【发布时间】:2018-07-31 02:09:23
【问题描述】:

我正在学习 Google+ Domains API OAuth 教程 here,但在导入 PlusDomains 时遇到问题。我有

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

在 build.gradle 中,但 Android Studio 告诉我没有要导入的内容,并要求我创建类。我有最新的 Android SDK。我的 build.gradle 如下:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "something.edu.androidoauth"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-beta01'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.google.android.gms:play-services-plus:15.0.1'
    implementation 'com.google.android.gms:play-services-auth:15.0.1'
    implementation 'com.google.api-client:google-api-client-android:1.22.0'
}

我不知道还能尝试什么。任何帮助表示赞赏。

【问题讨论】:

    标签: android google-api google-play-services google-plus


    【解决方案1】:

    原来正确的依赖是

    compile 'com.google.apis:google-api-services-plusDomains:v1-rev457-1.23.0'
    

    我不太确定 com.google.android.gms:play-services-plus:15.0.1 的用途。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-03
      • 1970-01-01
      • 2016-06-15
      • 2017-02-09
      • 2015-12-28
      • 2016-03-03
      • 1970-01-01
      相关资源
      最近更新 更多