Reputation: 1641
I am using the latest Android Studio 1.2.2. While trying to set AppTheme to Theme.Material according to this answer to support for older versions too(other than API 21) and many other solutions on the internet I did everything that was written. I made a different values folder named values-v21 and styles.xml in that folder. Then I wrote <uses-sdk tools:node="replace" />
, the build gave me an error saying:
Error:(6, 5) uses-sdk element cannot have a "tools:node" attribute
Error:(6, 5) Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk element cannot have a "tools:node" attribute. Here is my app.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.amangrover.finalapp"
minSdkVersion 14
targetSdkVersion 22
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:22.2.0'
}
I thought this problem was fixed for newer versions of Android Studio?
Upvotes: 0
Views: 2459
Reputation: 746
Add this lines in your project's AndroidManifest.xml file to uses-sdk tag like this:-
<uses-sdk
tools:node="merge"
android:minSdkVersion="14"
android:targetSdkVersion="19"/>
And also add the tools name space in manifest :-
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" .....
.../>
Upvotes: 2