不能解析符号GoogleApiClient
问题描述:
在我的应用程序使用的LocationManager,现在我想用融合位置服务 我使用过Android Studio 1.1.0,并添加谷歌在玩的gradle服务库不能解析符号GoogleApiClient
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':pull_to_refresh')
compile project(':uil_library')
compile project(':viewPagerIndicatorLib')
compile files('libs/date4j.jar')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:cardview-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.3'
compile 'com.google.maps.android:android-maps-utils:0.3.+'
compile 'joda-time:joda-time:2.7'
compile 'com.github.shell-software:fab:1.0.5'
compile 'com.google.android.gms:play-services:6.5.87'
}
但是当我定义GoogleApiClient变量,它说
Cannot resolve symbol 'GoogleApiClient'
所以我点击Alt + Enter键导入,但它显示“添加库‘的Google Play服务-6.5.8.7’类路径”,所以我点击它,当我运行我的应用程序显示错误
Error:(9, 41) error: package com.google.android.gms.common.api does not exist Error:(23, 13) error: cannot find symbol class GoogleApiClient
我该如何解决这个问题以及造成它的原因。
答
我觉得很愚蠢的:) 的gradle这是我的主要应用程序,但我是用GoogleApiClient图书馆的项目,所以我必须补充compile 'com.google.android.gms:play-services:6.5.87'
到我的图书馆太