react-native-fast-image: Could not find com.android.tools:common:25.3.3.

i can not build my android project on mac with this build.gradle : `// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript { ext { buildToolsVersion = “27.0.3” minSdkVersion = 16 compileSdkVersion = 27 targetSdkVersion = 26 supportLibVersion = “27.1.1” } repositories { jcenter() google() } dependencies { classpath ‘com.android.tools.build:gradle:3.1.4’

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects { repositories { mavenLocal() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url “$rootDir/…/node_modules/react-native/android” } google() } }

task wrapper(type: Wrapper) { gradleVersion = ‘4.4’ distributionUrl = distributionUrl.replace(“bin”, “all”) } `

this error happend::

`A problem occurred configuring project ‘:react-native-fast-image’.

Could not resolve all artifacts for configuration ‘:react-native-fast-image:classpath’. Could not find com.android.tools:common:25.3.3. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/common/25.3.3/common-25.3.3.pom https://jcenter.bintray.com/com/android/tools/common/25.3.3/common-25.3.3.jar Required by: project :react-native-fast-image > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 project :react-native-fast-image > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.build:manifest-merger:25.3.3 project :react-native-fast-image > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.ddms:ddmlib:25.3.3`

what is that for ???

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 19
  • Comments: 16 (1 by maintainers)

Commits related to this issue

Most upvoted comments

In your app build.gradle you can add:

subprojects {project ->
    if (project.name.contains('your module name, E.g. react-native-fast-image')) {
            buildscript {
                repositories {
                maven { url : 'Different repository'  }
            }    
        }
    }
}

You could use something like

maven { url : "https://dl.bintray.com/android/android-tools/" }

I had the same problem, this works for me. I use Bitrise

Same issue here.

Same issue here

@wwhitakerV , that works fine if you are building locally, however if you are having a CI server running your build, this won’t work because it installs the package fresh each time.

If we are using this as an npm package and using a build server like App Center to handle our builds it is impossible to do the fix above except through a complicated script. This has to be resolved by a code change in this package for that situation. Unless someone has a better idea. This is urgent my project as I was trying to push some hot fixes out but now I can not.

Hey guys, this worked for me… in the react-native-fast-image build.gradle file replace your buildscript dependency version to 2.3.0.

After doing some research the 2.3.3 version is looking for a file that has dissappeared from jcenter -> https://jcenter.bintray.com/com/android/tools/common/ <- head there and you’ll see that 25.3.3 is gone. Not sure what’s going on here, but my app is running as expected now.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:2.3.0"
    }
}

@MSSPL-PiyaleeMaiti suggestion from @fanr870606 works for me… try to use Android Studio to find which module is failed to build… In my case I had to change two modules

subprojects {project ->
    if (project.name.contains('react-native-image-picker')) {
        buildscript {
            repositories {
                maven { url "https://dl.bintray.com/android/android-tools/"  }
            }
        }
    }
    if (project.name.contains('react-native-vector-icons')) {
        buildscript {
            repositories {
                maven { url "https://dl.bintray.com/android/android-tools/"  }
            }
            dependencies {
                classpath "com.android.tools.build:gradle:2.3.0"
            }
        }
    }
}

@fanr870606

thanks a lot it’s work perfect and this is my final buid.gradle for other people as a refrence …

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

buildscript { ext { buildToolsVersion = “27.0.3” minSdkVersion = 16 compileSdkVersion = 27 targetSdkVersion = 26 supportLibVersion = “27.1.1” } repositories { google() jcenter() } dependencies { classpath ‘com.android.tools.build:gradle:3.2.1’

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects { repositories { google() maven { url “$rootDir/…/node_modules/react-native/android” } maven { url “https://maven.google.com” } mavenLocal() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url “$rootDir/…/node_modules/react-native/android” } } }

subprojects {project -> if (project.name.contains(‘react-native-fast-image’)) { buildscript { repositories { maven { url = “https://dl.bintray.com/android/android-tools/” } } } } }

task wrapper(type: Wrapper) { gradleVersion = ‘4.4’ distributionUrl = distributionUrl.replace(“bin”, “all”) } `

Maybe off-topic but: @hoseineghbal Did you know you can highlight code? https://help.github.com/articles/creating-and-highlighting-code-blocks/

thx to @fanr870606!

FYI dl.bintray.com/android/android-tools shouold be https://dl.bintray.com/android/android-tools/ (I guess the link was shortened by github when posted)

repositories {
   maven { url = 'https://dl.bintray.com/android/android-tools/'}
}