【问题标题】:Android : com.google.maps:google-maps-services:0.1.7 gives build errorsAndroid : com.google.maps:google-maps-services:0.1.7 给出构建错误
【发布时间】:2017-05-29 03:16:16
【问题描述】:

我尝试通过使用 com.google.maps:google-maps-services:0.1.7 版本来使用 Google 地图服务。

complie 'com.google.maps:google-maps-services:0.1.7'添加到build.gradle(Module: app)后,我尝试同步项目。

然后我在 Messages Gradle Sync 中遇到以下错误,

D:\Solutions\Security\app\build.gradle
Error:(26, 0) Gradle DSL method not found: 'complie()'

Possible causes:The project 'AIGSecurity' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
Upgrade plugin to version 2.3.2 and sync project
The project 'Security' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file
The build file may be missing a Gradle plugin.
Apply Gradle plugin

这是我的 build.gradle(Module: app) 文件,

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.0'

    defaultConfig {
        applicationId "solutions.com.security"
        minSdkVersion 18
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    complie 'com.google.maps:google-maps-services:0.1.7'
    compile 'com.google.android.gms:play-services-maps:10.2.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'
    compile 'joda-time:joda-time:2.9.4'
    compile 'com.auth0.android:jwtdecode:1.1.0'
    compile 'com.android.support.constraint:constraint-layout:+'
    androidTestCompile 'junit:junit:4.12'
    compile 'com.google.android.gms:play-services-location:10.2.1'
    compile 'com.android.support:support-annotations:24.2.0'
    compile 'com.google.firebase:firebase-messaging:10.0.1'
}

apply plugin: 'com.google.gms.google-services'

有没有办法解决这个问题?

【问题讨论】:

  • 看看这个question
  • @user7790438 :我读过它,但它没有为我提供任何解决方案。还有其他想法吗?

标签: java android google-maps time geocode


【解决方案1】:

你拼错了 compile

complie 'com.google.maps:google-maps-services:0.1.7'

compile 'com.google.maps:google-maps-services:0.1.20'

【讨论】:

  • 谢谢亲爱的:)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-04-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多