How to import a specific version of fabric in android

Viewed 1749

I am building an android app using Bazel build, and I am not able to send crash logs to fabric.io after the Bazel build. I'm thinking the main problem may be the sync between the module version in android build.gradle and BUILD file.

I have a 1.4.0 version of fabric in BUILD file, my doubt now is how and from where (repo) do I import a specific version of fabric?

My dependecies have classpath 'io.fabric.tools:gradle:1.+' in them when I change the 1.+ to 1.4.0. I'm getting an error telling that there's no such fabric 1.4.0. This is my code:

buildscript{
repositories {
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'io.fabric'

repositories {
    maven {
        url 'https://google.bintray.com/tensorflow'
    }
    maven { url 'https://maven.fabric.io/public' }
}

project gradle file:

buildscript {
    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.fabric.io/public'
        }

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:4.2.0'
         classpath 'io.fabric.tools:gradle:1.26.1'
}
}

allprojects {
     repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.google.com/'
        }
    }
 }


task clean(type: Delete) {
    delete rootProject.buildDir
 }

Is there a way to import a specific package of fabric in android?

5 Answers

Please check this gradle code.

apply plugin: 'io.fabric'

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.27.0'
    }
}

repositories {
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
}

Please check This link.

Yes you can add specific version in your code Fabric current version is

1.27.0 For more details, you can check the latest version here

Yes you can add the specific version.

Here is the official list of all versions of Fabric Gradle plugin including the latest release i.e. 1.27.0. As you can see in the list there is no version 1.4, hence it gives you that error.

To add the latest version you need to add this line in dependency:

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

Always read the comments in official documentation, this link is already in the comments :)

Just Installed fabric plugin and follow the instruction

https://fabric.io/home

after installed the plugin see in android studio at Right Top corner fabric button.

click this and login and proceed as show steps

Related