I have a Android / Gradle based project
AndroidManifest.xml sets sdk:
...
<uses-sdk android:minSdkVersion="16"
android:targetSdkVersion="22"
android:compileSdkVersion="22"/>
...
In the Gradle configuration - build-extras.gradle I set sdk as well - roughly:
...
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId 'com.example.myapp'
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName '1.0'
}
...
When building the project with Gradle I get:
...
No resource identifier found for attribute 'compileSdkVersion' in package 'android'
...
Why ?
I got it to build removing android:compileSdkVersion="22" from the AndroidManifest.xml but that was a lucky punch after a lot of trial and errors. So I had liked to know why?
<uses-sdk> has following syntax, and that does not include compileSdkVersion attribute:
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
uses-sdk element documentation
compileSdkVersion is relevant for compilation process, not for execution of final application, therefore it has no place in application manifest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With