我正在尝试在Android Studio项目中使用Dagger 2.我用过CoffeeMaker的例子.我设法使应用程序构建和工作: - 我没有成功看到生成的代码. - 如果我调试,我也看不到它. - 另外DaggerCoffeeApp_Coffee标记为芦苇(无法解析符号)
我的gradle文件是:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Run Code Online (Sandbox Code Playgroud)
和
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.mateuyabar.android.dagger2test"
minSdkVersion 22
targetSdkVersion 22
versionCode …Run Code Online (Sandbox Code Playgroud) android gradle android-studio android-gradle-plugin dagger-2