Hi i am trying to build my first project using Android support libraries in order to support material design for all of the devices on market. At the very begining of my journey i create a project from scratch and when i build from graddle using this module configuration:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "19.1"
defaultConfig {
applicationId "com.sunshine.org.weather"
minSdkVersion 13
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:support-v13:24.2.1'
}
i get theese errors -->>>
GRADDLE ERROR:
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources
invalid resource directory name: C:\Users\weather\app\build\intermediates\res\merged\debug/values-b+sr+Latn
FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
When i deleted the "values-b+sr+Latn" folder containing the coresponding XML file, it always gets recreated by the studio when i build my project.
I Tried to clean and build but that did not serve as solution to my problems.
I am trying to run the app on KitKat(API Level 14) and want to have material design down to HONEYCOMB(API Level 13) and support application up to NOUGAT(API Level 24)
Could you please point out my mistakes?
Try this in build.gradle
aaptOptions {
ignoreAssetsPattern "!values-b+sr+Latn"
}
To expand on powder366's answer, and the comment, since I don't have the rep to comment myself.
Inside the Gradle Script called 'build.gradle' for the Project:Name, there is an 'android' section with brackets. Inside those brackets you can add
aaptOptions { ignoreAssetsPattern "!values-b+sr+Latn" }
So you'd end up with something like
android {
aaptOptions {
ignoreAssetsPattern "!values-b+sr+Latn"
}
}
That fixed it for me right away, when Rebuilding the project
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