Sowmya Ravichandran
Sowmya Ravichandran

Reputation: 177

Android studio compiledsdkversion 23 is not working

I have recently updated android studio which brought me many problems. whenever I create a new android project the gradle scripts(Module:app) is displaying the below code

 apply plugin: 'com.android.application'

 android {
 compileSdkVersion 23
 buildToolsVersion "23.0.1"

 defaultConfig {
     applicationId "com.example.listproject"
     minSdkVersion 17
     targetSdkVersion 23
     versionCode 1
     versionName "1.0"
  }
  buildTypes {
     release {
         minifyEnabled false
         proguardFiles getDefaultProguardFile('proguard-android.txt'),                          `'proguard-rules.pro'`
    }
}

}

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

here the above compiledsdkversion 23 provides me

Error:Failed to find: com.android.support:appcompat-v7:23.+ Open File:open.dependency.in.project.structure">Open in Project Structure dialog

Because before upgrading I had compiledsdkversion as 21 and it does not provide any problem in gradle sync task.

But when I manually modified the compiledsdkversion to 21 it worked correctly.But every time when I create a new project it has been set to 23.Is there any way to make 21 as default or any corrections for compiledsdkversion 23 itself.

I have another doubt before upgradation my restful services projects worked correctly after this upgradation I am facing many problems.

Even HelloWorld application is not running.But if I manually change the compiledsdkversion to 21 everything is fine.Please provide me a solution for making the compiledsdkversion to 21 by default.

Upvotes: 2

Views: 137

Answers (1)

k3b
k3b

Reputation: 14755

 > compile 'com.android.support:appcompat-v7:23.+'

The "+" in "v7:23.+" means to take the newest "v7:23" version. If you have no internetconnection this fails.

either reestablish an internetconnection while building or replace the package with a fixed versionnumber that your system has locally cached when there was an internet conntection (i.e. com.android.support:appcompat-v7:23.0.1)

Upvotes: 1

Related Questions