解析google android sdk,java – 无法解析com.google.android.gms play-servi...

该博客讲述了作者在Android项目中尝试集成FirebaseUI-Auth遇到的问题,包括build.gradle配置错误和依赖管理。文章将详细介绍错误排查过程和正确配置方法,适用于Firebase开发者寻求帮助。
摘要由CSDN通过智能技术生成

我想在Android项目中为Android FirebaseUI – Auth编写代码,但是从最近两天开始,我在当前代码中遇到错误,不知道如何修复它.努力但却没有以正确的方式发生.

这是我的build.gradle(项目:FriendlyChat)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {

jcenter()

mavenLocal()

}

dependencies {

classpath 'com.android.tools.build:gradle:2.2.2'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

classpath 'com.google.gms:google-services:3.0.0'

}

}

allprojects {

repositories {

jcenter()

mavenLocal()

}

}

task clean(type: Delete) {

delete rootProject.buildDir

}

这是我的build.gradle(模块:app)

apply plugin: 'com.android.application'

apply plugin: 'com.google.gms.google-services'

repositories {

mavenLocal()

flatDir {

dirs 'libs'

}

}

android {

compileSdkVersion 24

buildToolsVersion "24.0.1"

defaultConfig {

applicationId "com.google.firebase.udacity.friendlychat"

minSdkVersion 16

targetSdkVersion 24

versionCode 1

versionName "1.0"

}

buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}

}

packagingOptions {

exclude 'META-INF/LICENSE'

exclude 'META-INF/LICENSE-FIREBASE.txt'

exclude 'META-INF/NOTICE'

}

}

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

// Displaying images

compile 'com.android.support:design:24.2.1'

compile 'com.android.support:appcompat-v7:24.2.1'

compile 'com.github.bumptech.glide:glide:3.6.1'

compile 'com.google.firebase:firebase-database:11.0.4'

compile 'com.google.firebase:firebase-auth:11.0.4'

compile 'com.google.android.gms:play-services-auth:11.4.0'

testCompile 'junit:junit:4.12'

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值