realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.46k stars 1.75k forks source link

Error:Cannot change dependencies of configuration ':app:_debugAnnotationProcessor' after it has been resolved. #4972

Closed cbedoy closed 7 years ago

cbedoy commented 7 years ago

Hi everyone! I'm trying to update to Realm 3.5.0, but I'm getting this error everytime!, So I can't compile, my gradle files are:

Main Build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript { repositories { jcenter() maven { url 'https://www.testfairy.com/maven' } } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.testfairy.plugins.gradle:testfairy:1.14' classpath 'io.realm:realm-gradle-plugin:3.4.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }

allprojects { repositories { jcenter() } }

task clean(type: Delete) { delete rootProject.buildDir }

Module Build Gradle

apply plugin: 'com.android.application' apply plugin: 'testfairy' apply plugin: 'realm-android' android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "com.xxxxxx" minSdkVersion 19 targetSdkVersion 25 versionCode 1 versionName "0.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    jackOptions {
        enabled true
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

compileOptions {
    targetCompatibility 1.8
    sourceCompatibility 1.8
}

testfairyConfig {
    apiKey "xxxxxxxx"
}

}

ext { supportLibVersion = "25.3.1" }

dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) 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:${supportLibVersion}" compile "com.android.support:design:${supportLibVersion}" compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.ogaclejapan.smarttablayout:library:1.2.1@aar' compile 'org.nibor.autolink:autolink:0.6.0' compile 'de.hdodenhof:circleimageview:2.1.0' compile 'com.github.bumptech.glide:glide:4.0.0-RC1' compile 'jp.wasabeef:glide-transformations:2.0.2' // If you want to use the GPU Filters compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1' compile 'it.sephiroth.android.library.imagezoom:imagezoom:2.2.5' compile 'com.vstechlab.easyfonts:easyfonts:1.0.0' compile 'com.squareup.retrofit2:retrofit:2.3.0' compile 'com.squareup.retrofit2:converter-gson:2.0.2' compile 'com.squareup.picasso:picasso:2.5.2' compile 'io.realm:realm-android:3.5.0' compile "org.igniterealtime.smack:smack-android:4.2.0" compile "org.igniterealtime.smack:smack-tcp:4.2.0" compile "org.igniterealtime.smack:smack-im:4.2.0" compile "org.igniterealtime.smack:smack-extensions:4.2.0"

testCompile 'junit:junit:4.12'

compile 'testfairy:testfairy-android-sdk:1.5.2@aar'

}

cbedoy commented 7 years ago

I'm using java 1.8.

I tried setting jackOptions as false and still

Zhuinden commented 7 years ago

@cbedoy Jack is deprecated, you need to use Retrolambda for Java 1.8 features ( https://github.com/evant/gradle-retrolambda ) until Build-Tools 3.0 is released, after which Retrolambda will no longer work, but we'll have lambdas out of the box.

cbedoy commented 7 years ago

Thank you !