Android Studio running problem

Asked

Viewed 158 times

0

Friends, I need your help to solve a problem.

When I open Android Studio appears the following error and I can’t do anything about it.

Could someone help me ?

>Failed to resolve:com.android.support:appcompat-v7:27.+

I appreciate the help!

  • If you use Android Studio 3.0, add google() as a repository in Gradle.

  • Friend, thanks for the help. However, I’m beginner do not know how to proceed.Could you explain me how to add in the repository ?

  • If possible post the code of your Gradle

  • android {
 compileSdkVersion 27
 buildToolsVersion "27.0.3"

 defaultConfig {
 applicationId "com.example.leomastra.primeiroprojeto"
 minSdkVersion 24
 targetSdkVersion 27
 versionCode 1
 versionName "1.0"
 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-Rules.pro' } } } dependencies { Compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' Compile 'com.android.support:appcompat-v7:27.+'

1 answer

1


Add dependency with full version:

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:26.1.0'
}

E in Gradle (app):

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

Then just sync the project.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.