这很简单,问题可能是基础
我想使用GoogleSignInOptions,GoogleSignInResult和Auth来实现google + signin。
我遵循指南这里是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" }
}
}
app build:
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'
*/
我被困在这一天,这让我疯了
更新:我删除了#34;编译文件(' libs / google-play-services.jar')"现在甚至R都给了我"无法解析符号"
答案 0 :(得分:0)
尝试在build.gradle文件的底部添加此行(您导入依赖项)
apply plugin: 'com.google.gms.google-services'