Why android / gradle raises: "Resource id not found for attribute" compileSdkVersion "?
I have an Android / Gradle based project
AndroidManifest.xml
installs sdk:
...
<uses-sdk android:minSdkVersion="16"
android:targetSdkVersion="22"
android:compileSdkVersion="22"/>
...
In Gradle config - build-extras.gradle I also installed sdk - roughly:
...
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId 'com.example.myapp'
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName '1.0'
}
...
When building a project with Gradle, I get:
...
No resource identifier found for attribute 'compileSdkVersion' in package 'android'
...
Why?
I managed to create a delete android:compileSdkVersion="22"
from AndroidManifest.xml
, but it was a lucky hit after a lot of trial and error. So I was wondering why?
source to share
<uses-sdk>
has the following syntax and does not include the attribute compileSdkVersion
:
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
compileSdkVersion
is relevant to the compilation process, not to the execution of the final application, so it has no place in the application manifest.
source to share