Reputation: 753
I originally had an error with gradle when I updated gradle about android apt. I went online and Googled what was wrong. I read that apt was no longer supported and I migrated my code accordingly and then went to rebuild.
However, now I'm getting this error even after migrating my code and removing all android apt codes and converting them to annotations
Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
This is my build.gradle
file for that module:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
//apply plugin: 'me.tatarka.retrolambda'
// Manifest version information!
def versionMajor = 0
def versionMinor = 1
def versionPatch = 0
def versionBuild = 11 // bump for dogfood builds, public betas, etc.
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
lintOptions {
abortOnError false
}
dexOptions {
javaMaxHeapSize "4g"
}
defaultConfig {
applicationId "com.ltst.schoolapp.teacher"
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
multiDexEnabled true
}
signingConfigs {
release {
storeFile file('../teacher/distribution/schoolappteacher.keystore')
storePassword "LtStSchoolappTeacher"
keyAlias "teacherreleasekey"
keyPassword "UgoTeacher"
}
}
buildTypes {
debug {
applicationIdSuffix '.dev'
versionNameSuffix '-dev'
debuggable true
}
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '26.0.2'
}
repositories {
maven {
url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo'
}
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.2.1'
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.1.3'
compile 'com.uphyca:stetho_realm:0.9.0'
compile 'com.github.thorbenprimke:realm-recyclerview:0.9.23'
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true
}
implementation project(path: ':core')
// compile 'com.layer.sdk:layer-sdk:0.20.3'
// compile 'com.google.android.gms:play-services-gcm:7.5.0'
// compile 'org.slf4j:slf4j-nop:1.5.8'
}
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.apk'))
output.outputFileName = "schoolapp-teacher-${output.name}.apk"
}
}
apply plugin: 'com.google.gms.google-services'
Upvotes: 0
Views: 459