Androidスタジオ3.1のプレビューでdagger2がうまくいかない理由は誰にも分かりますか?dagger2をAndroidスタジオに追加する3.1プレビュー
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.orbitlab.mowerapp"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.google.firebase:firebase-messaging:11.4.2'
implementation 'com.google.firebase:firebase-database:11.4.2'
implementation 'com.google.firebase:firebase-auth:11.4.2'
implementation "com.google.firebase:firebase-firestore:11.4.2"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.github.bumptech.glide:glide:4.3.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
implementation 'com.android.support:customtabs:26.1.0'
implementation 'com.google.android.gms:play-services-fitness:11.4.2'
implementation 'com.google.android.gms:play-services-auth:11.4.2'
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
annotationProcessor 'com.google.dagger:dagger-compiler:2.10'
implementation 'com.google.dagger:dagger:2.10'
}
プラグインを適用する:「com.google.gms.google-サービスの
をこれが私のアプリのbuild.gradleファイルがどのように見えるかです。私はプロジェクトのbuild.gradleファイルに何も追加していません。
誰でも手助けできますか?
編集:
今Gradleの同期が、(まだこのプロジェクトにダガー使用haventは)私のデバイスに展開しようとしたとき、私はDEXエラーが発生します。 エラーは次のとおりです。
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'
1.Clean
あなたが試してみました**実装**ではなく**コンパイル**? –
@HarshadPrajapati変更なし:/ –
あなたのアプリでGoogle Playサービスを使用していますか? –