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

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 {
//......
}
}

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'

sentry android install error Failed to resolve: androidx.lifecycle:lifecycle-common-java8:2.4.0

i want to add sentry 5.6.0 to my android project but always give error on gradle build
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id "io.sentry.android.gradle" version "3.0.0"
}
apply plugin: 'io.sentry.android.gradle'
dependencies {
...
implementation 'io.sentry:sentry-android:5.6.0'
}
i have two build.gradle and other file has below lines
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url 'https://github.com/akapelrud/Rotary-Seekbar/raw/master/RotaryKnob/snapshots' }
}
}
this is part of my gradle.build file and using kotlin and minSdk 19 tagetSdk 32

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.+'

Adding multiple repositories in build.gradle : android

I am trying to manage all the repositories in to one tree and tried the following
apply plugin: 'com.android.feature'
apply plugin: 'io.fabric'
buildscript {
repositories {
maven {
url 'https://maven.fabric.io/public'
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
}
repositories {
jcenter()
maven { url 'https://s3-ap-southeast-1.amazonaws.com/jp-build-packages/ec-android-sdk' }
maven { url 'https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/' }
maven { url 'https://jitpack.io' }
maven {
url 'http://phonepe.bintray.com/PhonePeAndroidSDK-SNAPSHOT'
credentials {
username 'phonepe_android_sdk_snapshot_0_1_0#phonepe'
password 'xxxxxxxxxxx'
}
}
}
dependencies {
compile 'phonepe.sdk.android.snapshot:merchantSdk:0.5.9.1'
compile 'in.juspay:ec-android-sdk:1.1.6'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile project(':PayWithAmazon')
}
i tried to build the code and it alway says failed to resolve all the dependencies which i have added as shown in the code above.
If I declare all these repositories separately and ran the build and it is successfully building the project without any issue. I dint understood where exactly I am making the mistake.
Please help in understanding the issue.
Below is working fine if i have added these repositories separately
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
//apply plugin: 'com.android.application'
apply plugin: 'com.android.feature'
apply plugin: 'io.fabric'
// For Fabric
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
//For Localytics
repositories
{
jcenter()
maven { url 'http://maven.localytics.com/public' }
}
//For JusPay
repositories
{
maven {
url 'https://s3-ap-southeast-1.amazonaws.com/jp-build-packages/ec- android-sdk'
}
maven {
url 'https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/'
}
}
//for Phone Pe staging
repositories {
mavenCentral()
maven {
url "https://jitpack.io"
}
maven {
url "http://phonepe.bintray.com/PhonePeAndroidSDK-SNAPSHOT"
credentials {
username 'phonepe_android_sdk_snapshot_0_1_0#phonepe'
password 'xxxxxxxxxxx'
}
}
}
Thanks- Yakub.

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