2017-06-10 9 views
1

新しい機能を使用してXMLに直接フォントを追加しようとしています。サポートライブラリ26.0.0-beta2のフォント:エラー:プロローグでコンテンツが許可されていません

Iセットアップ26.0.0ベータ2サポートライブラリのための私のプロジェクトは、resフォルダにfontリソースフォルダを作成したが、それにいくつかのフォントをコピーし、それを構築しようとしたとき、私はエラーを受け取っ:コンテンツはに許可されていませんプロローグメッセージ。

これは構造体である:

enter image description here

私のアプリの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です一時的にフォントをプロジェクトの外のどこかに移動して再構築してから元に戻してもうまくいかない場合は、そのメッセージが再び表示されます。私はここで間違って何をしていますか?

ありがとうございます!

答えて

3

これらの新しい機能を使用するには、 classpath 'com.android.tools.build:gradle:から3.0.0-alpha1を少なくとも

に更新する必要があります
関連する問題