在Android Studio中设置google play服务?
我将按照这两个链接设置播放服务 但它无法找到GoogleAPI客户端类 这是我的格拉德尔在Android Studio中设置google play服务?,android,android-studio,google-play-services,google-api-client,Android,Android Studio,Google Play Services,Google Api Client,我将按照这两个链接设置播放服务 但它无法找到GoogleAPI客户端类 这是我的格拉德尔 apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.wishygupta.myapplication" minSdkVersion 15 targetS
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.wishygupta.myapplication"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
}
这是我的舱单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.wishygupta.myapplication" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我做错了什么?根据谷歌的建议,尝试使用+符号来颠覆支持库和谷歌播放服务,如下所示:
compile 'com.android.support:appcompat-v7:21.+'
compile 'com.google.android.gms:play-services:6.5.+'
另外,请确保您已下载最新的Play Services SDK版本22,并安装了Extras 我的成绩文件中的样本依赖项部分
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.+'
compile 'com.android.support:appcompat-v7:21.0.+'
compile 'com.google.android.gms:play-services:6.5.+'
}
抛出任何异常?是否有显示错误的导入语句或代码?没有引发异常。为私人GoogleapClient MgoogleapClient导入;无法访问。我的意思是它不是进口的