Bugs: I want to update Realm database from version 4.2.0 to 4.3.3, but after gradle sync, it will fail
Goal
Update Realm from 4.2.0 to 4.3.3
Expected Results
Gradle sync will success
Actual Results
Gradle sync failed with stacktrace:
Error:Execution failed for task ':QuizApp:processDebugResources'.
Could not get unknown property 'packageForR' for task
':QuizApp:processDebugResources' of type
com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.
Top level gradle file
buildscript {
repositories {
jcenter { url 'http://jcenter.bintray.com/' }
maven { url 'https://maven.fabric.io/public' }
maven { url "https://plugins.gradle.org/m2/" }
jcenter()
mavenCentral()
google()
}
dependencies {
// classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.2.0-alpha01'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'io.fabric.tools:gradle:1.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "com.github.nullstress:DependencyAnalysisPlugin:1.0.3"
classpath 'com.google.gms:google-services:3.1.0'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'
classpath "io.realm:realm-gradle-plugin:4.3.2"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.2'
}
}
I Try cleaning gradle cache and stop the gradle daemon. Then retry the build. But the problem remains
If you are using ButterKnife, just remove ButterKnife gradle plugin, and use the annotationProcessor + implementation version instead. See step bellow:
apply plugin: 'com.jakewharton.butterknife'
in gradleJust use/add dependencies below in gradle instead:
dependencies {
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With