【发布时间】:2016-12-03 16:45:04
【问题描述】:
将旧项目的 Google Play 服务插件更新为
com.google.gms:google-services:3.0.0,
我遇到了以下问题:
我的项目有一个lib模块被其他app模块共享,其gradle构建文件为:
apply plugin: 'com.android.library'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 25
versionCode 22
versionName "2.11"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.google.android.gms:play-services-location:10.0.1'
compile 'com.google.android.gms:play-services-wearable:10.0.1'
}
在构建项目时,我收到以下错误:
Error:(54, 41) error: package com.google.android.gms.maps.model does not exist
Error:(770, 19) error: cannot find symbol class LatLng
恢复到:
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.google.android.gms:play-services-wearable:9.0.0'
一切正常。
有什么想法吗?
【问题讨论】:
标签: android google-play-services