错误:添加Dagger 2(v2.11)时Gradle构建时标记不匹配

时间:2017-09-18 14:12:12

标签: android build.gradle dagger-2 dagger

在应用级build.gradle文件中添加 Dagger 2(v2.11)依赖项时,我收到 TAG MISMATCH错误。在Google上搜索了很多但没有得到此错误的原因。

有人对这个问题有所了解吗?

这是我的应用级build.gradle文件中的依赖项 - >

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})

def daggerVersion = '2.11'
def fireBaseVersion = '11.2.2'
def supportLibraryVersion = '26.0.1'

compile "com.google.dagger:dagger:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-android-processor:$daggerVersion"
compile "com.google.dagger:dagger-android-support:$daggerVersion"

compile "com.android.support:appcompat-v7:$supportLibraryVersion"
compile "com.android.support:customtabs:$supportLibraryVersion"
testCompile 'junit:junit:4.12'
compile "com.android.support:recyclerview-v7:$supportLibraryVersion"
compile "com.android.support:cardview-v7:$supportLibraryVersion"
compile "com.android.support:design:$supportLibraryVersion"
compile "com.android.support:gridlayout-v7:$supportLibraryVersion"
/*compile "com.android.support:palette-v7:$supportLibraryVersion"*/

compile "com.google.firebase:firebase-core:$fireBaseVersion"
compile "com.google.firebase:firebase-auth:$fireBaseVersion"
compile "com.google.firebase:firebase-database:$fireBaseVersion"
compile "com.google.firebase:firebase-storage:$fireBaseVersion"
compile "com.google.firebase:firebase-crash:$fireBaseVersion"
compile "com.google.android.gms:play-services-auth:$fireBaseVersion"
compile "com.google.firebase:firebase-ads:$fireBaseVersion"
compile "com.google.firebase:firebase-messaging:$fireBaseVersion"

compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.google.code.gson:gson:2.8.1'}

0 个答案:

没有答案