我正在尝试使用Dagger2和Kotlin但是今天尝试编译得到了这个错误:
错误:任务':app:compileDebugJavaWithJavac'的执行失败.
错误:(5,43)错误:找不到符号类ApplicationModule_ProvideApplicationFactory
(App)Build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.ilyarb.geotags"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
dexOptions {
javaMaxHeapSize "2048M"
}
}
kapt {
generateStubs = true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
final SUPPORT_LIBRARY_VERSION = "23.3.0"
final PLAY_SERVICES_VERSION = "8.4.0"
compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION" …Run Code Online (Sandbox Code Playgroud)