corymsmith / react-native-fabric

A React Native library for Fabric, Crashlytics and Answers
MIT License
1.31k stars 236 forks source link

Could not find com.android.tools:common:25.2.3 #210

Closed phoenix377 closed 4 years ago

phoenix377 commented 5 years ago

Description

I tried to build my react-native application for android. AndroidStudio tell me that common:25.2.3 is undefined in jcenter repository.

How to repeat issue and example

Create a new react application (version should be 0.57.7). Install and link react-native-fabric. Open AndroidStudio, ask it to sync project file with gradle files.

Additional Information

React Native version: 0.57.7 Platform: Android Development Operating System: MacOS Dev tools: Android Studio v3.2.1

hanyuei commented 5 years ago

i got the same issue.

phoenix377 commented 5 years ago

This issue is happening because common:25.2.3 is deleted in jcenter. I managed to solve this issue by adding following code in /android/build.gradle until the gradle classpath of the library get updated.

subprojects { project ->
    if (project.name.contains('react-native-fabric')) {
        buildscript {
            repositories {
                google()
                jcenter()
            }

            dependencies {
                classpath 'com.android.tools.build:gradle:3.1.4'
            }
        }
    }
}
hanyuei commented 5 years ago

yes, the library is missing in jcenter here. and subprojects works, on my side using a different maven repo solve it. https://github.com/DylanVann/react-native-fast-image/issues/366#issuecomment-445492731

subprojects {project ->
    if (project.name.contains('react-native-fabric')) {
        buildscript {
            repositories {
                maven {
                    url "https://dl.bintray.com/android/android-tools/"
                }
            }
        }
    }
}

and for now com.android.tools:common:25.2.3 in is dl.bintray.com/android/android-tools

krupalagravat commented 5 years ago

Fixed by this 👍 https://github.com/DylanVann/react-native-fast-image/issues/366#issuecomment-446227637