Could not find io.fabric.tools:gradle:1.28.1 - android

I want to install Firebase Crashlytics on my project but I encounter such a problem when building
Tried
- I can do comment //apply plugin: "io.fabric"
- I Dropped the version classpath 'io.fabric.tools:gradle:1.28.1' to classpath 'io.fabric.tools:gradle:1.28.0'
android/build.gradle
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.28.1'
maven {
url 'https://maven.fabric.io/public'
}
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
proguard-rules.pro
-keep class io.invertase.firebase.** { *; }
-dontwarn io.invertase.firebase.**
app/build.gradle
// Firebase dependencies
implementation "com.google.android.gms:play-services-base:16.1.0"
implementation "com.google.firebase:firebase-core:16.0.9"
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9#aar') {
transitive = true
}
apply plugin: "io.fabric"
Problem
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find io.fabric.tools:gradle:1.28.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.pom
- https://dl.google.com/dl/android/maven2/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.jar
- https://jcenter.bintray.com/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.pom
- https://jcenter.bintray.com/io/fabric/tools/gradle/1.28.1/gradle-1.28.1.jar
Required by:
project :

try this
project.gradle
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
}
app/build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.29.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
google()
}

Add following code into app/build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
..........
}

Related

Realm Proxy class are not generated

I have updated my Realm from 7.0.0 to 10.13.0. After updating I am facing issues in realm proxy classes. All my old import codes of proxy classes show Cannot resolve symbol 'com_example_android_model_XXXXRealmProxy. I have updated my android target SDK version to 31, So I had to update the Java version from 8 to 11.
App build.gradle
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "io.realm:realm-gradle-plugin:10.13.0"
classpath 'de.mobilej.unmock:UnMockPlugin:0.7.6'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.1'
}
repositories {
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://jitpack.io" }
maven { url "https://clojars.org/repo/" }
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
jcenter()
}
}
allprojects {
repositories {
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://jitpack.io" }
maven { url 'https://github.com/WickeDev/stetho-realm/raw/master/maven-repo' }
maven { url "https://clojars.org/repo/" }
mavenCentral()
jcenter()
}
}
Project build.gradle
apply plugin: 'com.android.application'
apply plugin: 'de.mobilej.unmock'
apply plugin: 'com.jakewharton.butterknife'
apply plugin: 'realm-android'

Failed to resolve play-services-auth and firebase-core

Project sync failed with the following errors.
Failed to resolve: play-services-auth
Open File
Failed to resolve: firebase-core
Open File
Tried replacing google() with maven { url "https://maven.google.com" } but no luck. Here is the content of build.gradle files.
build.gradle (app)
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
//google()
maven { url "https://maven.google.com" }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.7.0'
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
//apply plugin: 'com.google.gms.google-services'
android {
//other codes
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
//other codes
}
apply plugin: 'com.google.gms.google-services'
build.gradle(project)
buildscript {
repositories {
jcenter()
maven { url "https://maven.google.com" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:3.2.0'
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
maven { url "https://maven.google.com" }
mavenCentral()
}
}
ext {
minSdkVersion = 16
targetSdkVersion = 27
compileSdkVersion = 27
//Other code
}
task clean(type: Delete) {
delete rootProject.buildDir
}
If I put apply plugin: 'com.google.gms.google-services' just below apply plugin: 'io.fabric' I get the following errors
Could not find com.google.android.gms:play-services-auth-license:11.6.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.aar
https://jitpack.io/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.pom
https://jitpack.io/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.aar
https://maven.google.com/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.pom
https://maven.google.com/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.aar
https://repo.maven.apache.org/maven2/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.pom
https://repo.maven.apache.org/maven2/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.aar
https://maven.fabric.io/public/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.pom
https://maven.fabric.io/public/com/google/android/gms/play-services-auth-license/11.6.0/play-services-auth-license-11.6.0.aar
Required by:
project :app > com.google.android.gms:play-services-auth:11.4.2
Did you generate the google-services.json file from the firebase under the project>app and add all the plugins at the bottom
In your build.gradle where you reference 'com.facebook.android:account-kit-sdk:4.+'
Please use 'com.facebook.android:account-kit-sdk:4.23.0'
instead of 'com.facebook.android:account-kit-sdk:4.+'

i keep getting an error when i try to use google crashlytics

I am trying to use Crashlytics in my app but keep getting an error saying
Error:(30, 1) A problem occurred evaluating root project 'CodeX_TeaXt'.
Could not find method buildscripts() for arguments [build_dujqhmp6npuv4v2dkd04dm37r$_run_closure3#30d25365] on root project 'CodeX_TeaXt' of type org.gradle.api.Project.
And here's my code for the build.gradle file :
allprojects {
repositories {
google()
jcenter()}
}
task clean(type: Delete) {
delete rootProject.build``Dir}
buildscripts{
repositories {
// ...
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
// ...
classpath 'io.fabric.tools:gradle:1.24.4'
}
}
And:
allprojects {
// ...
repositories {
// ...
maven {
url 'https://maven.google.com/'
}
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
dependencies {
// ...
compile('com.crashlytics.sdk.android:crashlytics:2.7.1#aar') {
transitive = true
}
compile 'com.google.firebase:firebase-core:11.6.2'
}
I am also having a problem using performance, test lab, so help
You should move:
maven {
url 'https://maven.google.com/'
}
from you app-level build.gradle to you project-level build.gradle based on the instructions in: https://firebase.google.com/docs/crashlytics/get-started

Could not find io.fabric.tools:gradle

I'm following official instructions of fabric
https://www.fabric.io/kits/android/crashlytics/install
This is my gradle.build file
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
jcenter()
mavenCentral()
maven {
url 'https://maven.google.com'
}
}
dependencies {
...
classpath 'io.fabric.tools:gradle:1.24.3'
}
}
repositories {
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven {
url 'https://maven.google.com'
}
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 22
buildToolsVersion '25.0.3'
defaultConfig {
....
}
}
dependencies {
......
compile('com.crashlytics.sdk.android:crashlytics:2.7.0#aar') {
transitive = true
}
}
apply plugin: 'com.google.gms.google-services'
but when I try to sync my project, it says that could not find io.fabric.tools:gradle:1.24.3 searched in following locations:
Error:Could not find io.fabric.tools:gradle:1.24.3.
Searched in the following locations:
file:/home/dev-00/soft/android-studio-3.0.0/android-studio/gradle/m2repository/io/fabric/tools/gradle/1.24.3/gradle-1.24.3.pom
file:/home/dev-00/soft/android-studio-3.0.0/android-studio/gradle/m2repository/io/fabric/tools/gradle/1.24.3/gradle-1.24.3.jar
https://jcenter.bintray.com/io/fabric/tools/gradle/1.24.3/gradle-1.24.3.pom
https://jcenter.bintray.com/io/fabric/tools/gradle/1.24.3/gradle-1.24.3.jar
... Required by:
project :
In your buildscript block you have to add also the fabric repo.
buildscript {
repositories {
//... jcenter(), google()...
maven { url 'https://maven.fabric.io/public' }
}
}
dependencies {
//......
}
}

Multiple maven repositories in Gradle

I have the following build.gradle:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
maven {
url "https://dl.bintray.com/fyber/maven"
}
maven {
url "https://dl.bintray.com/supersonic/android-sdk"
}
}
dependencies {
classpath 'io.fabric.tools:gradle:1.19.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
dependencies {
// Ads
compile 'com.supersonic.sdk:mediationsdk:6.1.0#jar'
}
And I'm getting this error:
Error:(88, 13) Failed to resolve:
com.supersonic.sdk:mediationsdk:6.2.0
I've checked that library exists in the repository. Why am I getting this error?
You added those repositories to the buildscript list of repositories. Hence, those repositories are only used for the dependencies listed in buildscript.
You need a repositories closure outside of buildscript, listing the repositories where your top-level dependencies reside. So, probably what you want is something like:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
maven {
url "https://dl.bintray.com/fyber/maven"
}
}
dependencies {
classpath 'io.fabric.tools:gradle:1.19.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
repositories {
maven {
url "https://dl.bintray.com/supersonic/android-sdk"
}
}
dependencies {
// Ads
compile 'com.supersonic.sdk:mediationsdk:6.1.0#jar'
}

Categories

Resources