[英]com.google.gms.google-services not adding class GoogleSignInOptions
這很簡單,問題可能是根本的
我想使用GoogleSignInOptions,GoogleSignInResult和Auth來實現google +登錄。
我正在遵循的指南是gradle版本:
項目構建:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
allprojects {
repositories {
jcenter()
maven { url "http://jzaccone.github.io/SlidingMenu-aar" }
}
}
應用程式建立:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.ili.BDigital"
minSdkVersion 14
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':eventBrowser')
}
庫(附加模塊)構建:
apply plugin: 'com.android.library'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.squareup.okhttp3:okhttp:3.1.2'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.code.gson:gson:2.3'
compile 'com.etsy.android.grid:library:1.0.5'
compile 'com.jeremyfeinstein.slidingmenu:library:1.3@aar'
compile 'com.jakewharton:butterknife:4.0.1'
compile 'com.pubnub:pubnub:3.7.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.wefika:horizontal-picker:1.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.5.0'
compile files('libs/com.haarman.listviewanimations-2.5.2.jar')
compile files('libs/google-play-services.jar')
compile files('libs/htmlcleaner-2.8.jar')
compile files('libs/socialauth-4.9.jar')
compile files('libs/socialauth-android-3.2.jar')
}
/*
compile 'com.pubnub:pubnub-android-debug:3.7.+'
compile 'javax.inject:javax.inject:1@jar'
compile 'com.squareup.dagger:dagger-compiler:1.1.0'
compile 'com.jakewharton:butterknife:4.0.1'
compile 'com.squareup.dagger:dagger:1.1.0'
compile 'com.github.pedrovgs:renderers:1.0.9'
compile 'com.google.gms:google-services:2.0.0-rc1'
*/
我已經堅持了一天,這讓我發瘋
更新:我刪除了“編譯文件('libs / google-play-services.jar')”,現在連R都給我“無法解析符號”
嘗試在build.gradle文件的底部添加此行(導入依賴項)
apply plugin: 'com.google.gms.google-services'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.