I'm trying to add Dagger2 to my project in Android Studio but I can't find proper dependency to paste in build.gradle. Could you help and send me the proper line?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
in your app/build.gradle
and
in build.gradle of your project.
You don't need the android-apt plugin anymore,all functionality that was previously provided by android-apt is now available in the Android Gradle plugin version 2.2
https://bitbucket.org/hvisser/android-apt/wiki/Migration
Update Gradle plugin to
and Dagger dependencies to
Cheers!
Installing Dagger 2 on Android Studio 2
Maven Repositories:
Find the latest versions of the above dependencies in the Maven Repository:
Notes: Android Studio < 2.2
Older versions of Android Studio need
android-apt
for annotation processing.And
Notes: Dagger < 2.1
For Dagger < 2.1-SNAPSHOT the
javax.annotation
is needed for the@Generated
annotation used in Dagger generated code (see github.com/google/dagger/issues/95). The annotation is not included in the Android API jar, so you'll need to use one of these libraries (see differences):I had some trouble with this earlier today. Here's what worked for me with the latest versions as of this date using Android Studio 2.0 preview 8:
buid.gradle (Module:app)
build.gradle (Project:proj):