值-b + sr + Latn的Android构建错误 [英] Android build error for values-b+sr+Latn

查看:84
本文介绍了值-b + sr + Latn的Android构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Android支持库构建我的第一个项目,以支持市场上所有设备的材料设计.在我旅行的一开始,我从头开始创建了一个项目,当我使用此模块配置从gradle构建时:

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 -->>>


等级错误:
:app:generateDebugResources最新 :app:mergeDebugResources :app:processDebugManifest截止日期 :app:processDebugResources 无效的资源目录名称:C:\ Users \ weather \ app \ build \ intermediates \ res \ merged \ debug/values-b + sr + Latn


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

失败

失败:构建失败,并出现异常.

FAILURE: Build failed with an exception.

  • 出了什么问题: 任务':app:processDebugResources'的执行失败. com.android.ide.common.process.ProcessException:无法执行aapt

  • What went wrong: Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt

尝试: 使用--stacktrace选项运行以获取堆栈跟踪.使用--info或--debug选项运行,以获取更多日志输出.

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

构建失败
当我删除包含coresponding XML文件的"values-b + sr + Latn"文件夹时,在我构建项目时,工作室总是会重新创建它. 我试图清理和构建,但这并不能解决我的问题.

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.


我正在尝试在 KitKat(API级别14) 上运行该应用,并希望将材料设计降至 HONEYCOMB(API级别13),并且最多支持 NOUGAT(API级别24) 的应用程序 你能指出我的错误吗?


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?

推荐答案

在build.gradle中尝试

Try this in build.gradle

aaptOptions {
    ignoreAssetsPattern "!values-b+sr+Latn"
}

这篇关于值-b + sr + Latn的Android构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆