could not find com.google.android.gms,ERROR: Could not find com.google.gms.google-services:4.2.0

I am trying to add Firebase crashlytics to an existing project (not developed by me). I keep getting the error

ERROR: Could not find com.google.gms.google-services:4.2.0:.

Required by:

project :

Search in build.gradle files

I have gone through all (or most ) of the solution that asks to add maven { url 'https://maven.google.com' } and none of them work. I am getting the above error for all the solution.

Please not other projects that i have developed are working fine with same build.gradle but not sure why this project is giving me nightmare.

project level build.gradle

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

buildscript {

repositories {

google()

jcenter()

maven {

url 'https://maven.fabric.io/public'

}

}

dependencies {

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

// Check for v3.1.2 or higher

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

// Add dependency

classpath 'io.fabric.tools:gradle:1.28.0'

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

// in the individual module build.gradle files

}

}

allprojects {

repositories {

google()

jcenter()

maven { url 'https://jitpack.io' }

//maven { url 'https://maven.google.com' }

}

}

task clean(type: Delete) {

delete rootProject.buildDir

}

app level build.gradle

apply plugin: 'com.android.application'

apply plugin: 'io.fabric'

android {

compileSdkVersion 27

defaultConfig {

applicationId "com.example.architgoyal.startup_prototype"

minSdkVersion 15

targetSdkVersion 27

versionCode 8

versionName "1.6.1"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}

buildTypes {

debug {

buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + System.currentTimeMillis() + "L)"

}

release {

buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + System.currentTimeMillis() + "L)"

minifyEnabled false

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

}

}

}

dependencies {

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

implementation 'com.android.support:appcompat-v7:27.1.1'

implementation 'com.android.support.constraint:constraint-layout:1.1.3'

//implementation 'com.google.firebase:firebase-core:16.0.8'

// Add dependency

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'

// barcode reader library

implementation 'info.androidhive:barcode-reader:1.1.5'

// google vision library

implementation 'com.google.android.gms:play-services-vision:11.0.2'

implementation 'com.android.support:design:27.1.1'

implementation 'com.github.GoodieBag:Pinview:v1.3'

implementation 'com.android.support:support-v4:27.1.1'

implementation 'me.dm7.barcodescanner:zxing:1.8.4'

implementation 'com.android.volley:volley:1.0.0'

implementation 'com.squareup.picasso:picasso:2.5.2'

annotationProcessor 'com.jakewharton:butterknife:6.1.0'

implementation 'com.jakewharton:butterknife:6.1.0'

implementation 'com.jaredrummler:material-spinner:1.3.1'

testImplementation 'junit:junit:4.12'

androidTestImplementation 'com.android.support.test:runner:1.0.2'

androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

}

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

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值