Android Studio Build Error After Upgrading Android

2019-02-15 23:25发布

问题:

After upgrading to Android Studio 1.3.1 yesterday, Getting this error when building projects, I cannot create a new project. Adding error and build.gradle file below :

Alredy tried changing compileSdkVersion and buildToolVersion to 21.

回答1:

Every major revision of the Support Library, such as the 23.0.0 AppCompat you are using, compiles against the API level of the same number: i.e., API 23 as per this G+ post from the AppCompat developer. Therefore to use 23.0.0, you must update your compileSdkVersion to 23.

Note this is completely different from targeting API 23 (which can be done separately and is what is required to use the runtime permissions model).