错误:在res中使用字体文件夹时,任务':app:processDebugResources'的执行失败

错误:在res中使用字体文件夹时,任务':app:processDebugResources'的执行失败

问题描述:

我已将SDK更新为Android O开发人员预览版,并使用单个TextView开始了一个简单的演示.

I have updated SDK to Android O developer preview and started a simple demo with single TextView.

当我在res文件夹中包含font时,它开始向我显示

When i included font inside res folder it started showing me

Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

这是我的build.gradle

Here is my build.gradle

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        ...
        minSdkVersion 15
        targetSdkVersion 25
    }
}

注意::我正在使用Android Studio 2.4 Preview 3

Note : I am using Android Studio 2.4 Preview 3

如果我从res删除font文件夹,则一切正常

If i remove font folder from res, everything works fine

此设置对我有用:

compileSdkVersion 'android-O'
buildToolsVersion '26.0.0-rc1'
minSdkVersion 'O'