Closed timur-st94 closed 7 years ago
What gradle plugins are you using and in what order?
Do you use Jack?
build.gradle(Module):
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
apply plugin: 'com.neenbedankt.android-apt'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "..."
minSdkVersion 19
targetSdkVersion 25
versionCode 3
versionName "1.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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'
})
compile 'com.android.support:appcompat-v7:25.0.1'
testCompile 'junit:junit:4.12'
apt "com.google.dagger:dagger-compiler:2.8"
compile 'com.android.support:design:25.0.1'
compile 'com.google.dagger:dagger:2.8'
provided 'javax.annotation:jsr250-api:1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.google.android.gms:play-services-maps:9.4.0'
compile 'com.android.support:leanback-v17:25.0.1'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.5@aar') {
transitive = true;
}
}
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}
build.gradle(Project):
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "io.realm:realm-gradle-plugin:2.3.0"
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Please apply plugins in this order( https://github.com/realm/realm-java/issues/3827 )
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'realm-android'
If I apply plugins in this order, then compile dagger has an error:
Error:(21, 25) error: cannot find symbol class DaggerDaggerComponent
Then you have some kind of error in your Dagger configuration. A @Provides
fields could be missing or something similar. Or the auto-generated class is just not imported.
@timur-st94 Is there anything else we can do for you? I'd like to close this ticket, if not.
@timur-st94 Closing this ticket. Please feel absolutely free to re-open it, or to open a new ticket, if there is more that we can help you with!
I'm getting this error in my project, when I try to use Dagger2
My RealmConfig:
My database controller:
Module class:
I am using Realm 2.3.0 and dagger 2.8. Please help to resolve this issue.