[英]square open source google-maps-services - NoClassDefFoundError: com/squareup/okhttp/OkHttpClient
[英]Android : com.google.maps:google-maps-services:0.1.7 gives build errors
我嘗試使用com.google.maps:google-maps-services:0.1.7版本來使用Google Map Service。
將complie 'com.google.maps:google-maps-services:0.1.7'
0.1.7 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'
有什么辦法可以解決此問題?
您拼寫錯誤
complie 'com.google.maps:google-maps-services:0.1.7'
至
compile 'com.google.maps:google-maps-services:0.1.20'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.