After generating a test project in android studio, there comes a time when I get the following error message:
After clicking on the message, it starts the installation, but it turns out that the same error still appears.
android studio 1.5.1
The case was that as the message said:
Failed to resolved com.android.support:appcompat-v7:15+
And just below a link that started an installation believed that this version was being installed.
After inquiring you can see that the one that was actually installed was the revision 23.1.1
of it.
build.gradle (module: app)
./ app / build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 15
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "com.example.temp.myapplication"
minSdkVersion 15
targetSdkVersion 15
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:15+'
}
Solution where the line that is created automatically from the file shown above appears:
compile 'com.android.support:appcompat-v7:15+'
Substituting the number 15+
that is indicates the revision you will use for that of the revision 23.1.1
or the one that is downloaded or that you have installed leaving something like this:
compile 'com.android.support:appcompat-v7:23.1.1'
If, like me, you have no idea which one you downloaded, you can watch it by opening the SDK Manager
> > in the SDK Tools
tab and look for it there.