Deovrat Bharadwaj
Deovrat Bharadwaj

Reputation: 71

Error: Could not find com.android.support:support-v4:27.0.1

I am getting the following error after updating Gradle to 3.3 and Android Studio version to 3.0.1

Error

Error:Could not find com.android.support:support-v4:27.0.1. Required by: project :app > com.android.support:design:25.2.0 project :app > com.android.support:design:25.2.0 > com.android.support:transition:25.2.0

Consult IDE log for more details (Help | Show Log)

Please install the Android Support Repository from the Android SDK Manager.

App Gradle Config:-

useLibrary 'org.apache.http.legacy'
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        vectorDrawables.useSupportLibrary = true
        applicationId "com.cyberrafting.joinapp"
        minSdkVersion 17
        targetSdkVersion 25
        versionCode 9
        versionName "9"
        multiDexEnabled true

Upvotes: 7

Views: 7710

Answers (3)

Sidharth Taneja
Sidharth Taneja

Reputation: 564

Copy this code in android/build.gradle file

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

Upvotes: -1

Abubakker Moallim
Abubakker Moallim

Reputation: 1658

Change your Compile version and Build Tool version

compileSdkVersion 27
buildToolsVersion '27.0.2'

And also all your support libraries to 27.0.2

Upvotes: 0

John O'Reilly
John O'Reilly

Reputation: 10350

As per https://developer.android.com/topic/libraries/support-library/setup.html, make sure you're including maven.google.com repo

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

Upvotes: 14

Related Questions