问题
I have updated SDK to Android O developer preview and started a simple demo with single TextView.
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
Here is my build.gradle
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
...
minSdkVersion 15
targetSdkVersion 25
}
}
Note : I am using Android Studio 2.4 Preview 3
If i remove font
folder from res
, everything works fine
回答1:
This setup worked for me:
compileSdkVersion 'android-O'
buildToolsVersion '26.0.0-rc1'
minSdkVersion 'O'
回答2:
I got the reference from Android Official Documentation
Updating your gradle
to -
android {
compileSdkVersion 'android-O'
buildToolsVersion '26.0.0-rc1'
defaultConfig {
targetSdkVersion 'O'
}
...
}
dependencies {
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
}
will going to be fix your all the problems!!
PS,
You cannot publish your app with this configuration. The "O"
version is a provisional API level that is usable only for development and testing during the Android O Developer Preview. You must wait to publish your Android O changes until the final API level is released, and then update your configuration again at that time.
回答3:
you have to make Assets Folder inside app and past your font into it and you have to register your font in Manifest file
来源:https://stackoverflow.com/questions/42949170/errorexecution-failed-for-task-appprocessdebugresources-when-using-font-fol