新しい機能を使用してXMLに直接フォントを追加しようとしています。サポートライブラリ26.0.0-beta2のフォント:エラー:プロローグでコンテンツが許可されていません
Iセットアップ26.0.0ベータ2サポートライブラリのための私のプロジェクトは、res
フォルダにfont
リソースフォルダを作成したが、それにいくつかのフォントをコピーし、それを構築しようとしたとき、私はエラーを受け取っ:コンテンツはに許可されていませんプロローグメッセージ。
これは構造体である:
私のアプリのbuild.gradle
は特別なものではありません:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.2'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
ext {
supportLibVersion = '26.0.0-beta2'
constraintLayout = '1.0.2'
playServicesVersion = '10.2.6'
butterknifeVersion = '8.0.1'
stethoVersion = '1.5.0'
realmStethoVersion = '2.0.0'
daggerVersion = '2.11'
}
task clean(type: Delete) {
delete rootProject.buildDir
}
と私のモジュールのbuild.gradle
は次のとおりです。
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.test.myproject"
minSdkVersion 21
targetSdkVersion 26
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(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'jsr305'
})
compile "com.android.support:support-core-utils:$supportLibVersion"
compile "com.android.support:appcompat-v7:$supportLibVersion"
//ConstrainLayout
compile "com.android.support.constraint:constraint-layout:$constraintLayout"
//Dager2
compile "com.google.dagger:dagger-android:$daggerVersion"
compile "com.google.dagger:dagger-android-support:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-android-processor:$daggerVersion"
testCompile 'junit:junit:4.12'
}
私がいることをどこかで読んそれはちょうどenです一時的にフォントをプロジェクトの外のどこかに移動して再構築してから元に戻してもうまくいかない場合は、そのメッセージが再び表示されます。私はここで間違って何をしていますか?
ありがとうございます!