【问题标题】:Failed to resolve: com.google.android.gms:play-services-maps:15.6.1 Install Repository and sync project Show in File Show in Project Structure dialog无法解决:com.google.android.gms:play-services-maps:15.6.1 安装存储库并同步项目在文件中显示在项目结构对话框中显示
【发布时间】:2018-10-20 04:05:19
【问题描述】:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.example.deegi.lab10"
        minSdkVersion 15
        targetSdkVersion 27
        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'])
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.google.android.gms:play-services-maps:15.6.1'
    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'
}

这是同步错误:Failed to resolve: com.google.android.gms:play-services-maps:15.6.1

构建错误:找不到 com.google.android.gms:play-services-maps:15.6.1。 在以下位置搜索:

我的模拟器播放服务版本是:11.3.02

【问题讨论】:

    标签: android build android-gradle-plugin google-play-services


    【解决方案1】:

    这是因为com.google.android.gms:play-services-maps:15.6.1不存在

    用途:

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

    【讨论】:

    • 此外,添加文件 build.gradle (Module: app) minSdkVersion 15。这解决了我的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-15
    • 2015-01-12
    • 2017-02-18
    相关资源
    最近更新 更多