2017-08-31 2 views
4

以下のようにGradleを使用してアプリケーションをビルドするときに問題があります。そして、私はエラーを受け取りました: エラー:(516)属性 "font"は既に互換性のないフォーマットで定義されています。 エラー:(298)元の属性がここで定義されています。 エラー:(516)属性 "font"が既に互換性のない形式で定義されています。 エラー:(298)元の属性がここで定義されています。エラー:属性 "font"が既に互換性のないフォーマットで定義されています

しかし、私のモジュールに "font" attrを使っている場所は見つかりません。

私を助けてください。

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.3-alpha', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile('com.weiwangcn.betterspinner:library-material:1.1.0') { 
     exclude group: 'com.android.support', module: 'appcompat-v7' 
     exclude group: 'com.rengwuxian.materialedittext', module: 'library' 
    } 
    compile('com.quickblox:quickblox-android-sdk-chat:[email protected]') { 
     transitive = true 
    } 
    compile('com.crashlytics.sdk.android:crashlytics:[email protected]') { 
     transitive = true; 
     compile 'com.stripe:stripe-android:+' 
    } 
    compile('com.crashlytics.sdk.android:answers:[email protected]') { 
     transitive = true; 
    } 
    compile 'com.quickblox:quickblox-android-sdk-core:[email protected]' 
    compile 'com.quickblox:quickblox-android-sdk-content:[email protected]' 
    compile 'com.quickblox:quickblox-android-sdk-messages:[email protected]' 

    compile 'com.android.support:appcompat-v7:26.0.1' 
    compile 'com.android.support:design:26.0.1' 
    compile 'com.android.support:cardview-v7:26.0.1' 
    compile 'com.android.support:recyclerview-v7:26.0.1' 
    compile 'com.android.support:leanback-v17:26.0.1' 
    compile 'com.android.support:customtabs:26.0.1' 
    compile 'com.rengwuxian.materialedittext:library:2.1.4' 
    compile 'com.bignerdranch.android:expandablerecyclerview:2.1.1' 
    compile 'com.github.bumptech.glide:glide:3.7.0' 
    compile 'com.daimajia.swipelayout:library:1.2.0' 
    compile 'ayar.oktay.library:advancedtextview:0.4.5' 
    compile 'de.hdodenhof:circleimageview:2.1.0' 
    compile 'jp.wasabeef:recyclerview-animators:2.2.4' 
    compile 'com.crystal:crystalrangeseekbar:1.1.1' 
    compile 'com.kyleduo.switchbutton:library:1.4.4' 
    compile 'me.relex:circleindicator:[email protected]' 
    compile 'com.google.code.gson:gson:2.8.0' 
    compile 'com.squareup.retrofit2:retrofit:2.2.0' 
    compile 'com.squareup.retrofit2:converter-gson:2.2.0' 
    compile 'com.squareup.okhttp3:okhttp:3.6.0' 
    compile 'com.squareup.okhttp3:logging-interceptor:3.6.0' 
    compile 'com.facebook.android:facebook-android-sdk:4.+' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.yalantis:ucrop:2.2.0' 
    compile 'com.yalantis:ucrop:2.2.0-native' 
    compile 'pub.devrel:easypermissions:0.1.9' 
    compile 'com.google.firebase:firebase-messaging:11.0.4' 
    compile 'com.google.android.gms:play-services-gcm:11.0.4' 


    compile 'com.jakewharton:butterknife:8.5.1' 
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' 
    testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 
    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' 
    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' 
    compile 'com.google.dagger:dagger:2.8' 
    annotationProcessor 'com.google.dagger:dagger-compiler:2.8' 
    debugAnnotationProcessor 'com.google.dagger:dagger-compiler:2.8' 
    compile 'io.reactivex:rxjava:1.2.2' 
    compile 'io.reactivex:rxandroid:1.2.1' 
    compile 'com.squareup.retrofit2:adapter-rxjava:2.2.0' 
    compile 'com.squareup.retrofit2:converter-gson:2.2.0' 
} 
apply plugin: 'com.google.gms.google-services' 

答えて

2

私の場合、問題は、属性"app:font"を定義したライブラリにあります。 私はそのライブラリを削除しました.xml内の場所はすべて"app:font"と書かれていて、私の問題は消えました。

追加の例: エラーが発生した場合は、AAPT: Attribute "iconTint" already defined with incompatible format xmlの"app:iconTint"を検索して削除してこの問題を解決する必要があります。

+0

ありがとう#Dima Kozhevin。私はライブラリの依存関係を変更した後、これも修正されています。 –

+0

ライブラリで "app:font"を使用する必要がある場合(実際にはコードの多くの場所で使用されています)その代わりに何がありますか? – amar

関連する問題