Update of Android studio from 2.3.3 to 3.2. ERRORS - android

I recently updated my Android Studio from 2.3.3 to 3.2 but unfortunately it have been two days, that I'm trying to fix bugs but, I resolved the most but I still have some problems that persist in my projects:
The gradle build keep showing me this error about Kotlin version:
The Android Gradle plugin supports only Kotlin Gradle plugin version
1.2.51 and higher. Project 'XXX' is using version 1.1.4-3.
=> The problem is my kotlin is declared as automated update version :
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
I don't know where can I change the version as they mention.
This line code is always underlined in red:
implementation 'com.android.support:appcompat-v7:28.0.0'
The build tool version is 28.0.2
The error declared is:
all com.android.support libraries must use the exact same version specification.
PS: I used 28.0.0 is all com.android.support libraries.
If you have any solutions to this two problems please let me know.
Thank you in advance.
Here is my build file
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.firebase.firebase-crash'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "com.ameerhamza6733.directmessagesaveandrepost"
minSdkVersion 17
targetSdkVersion 28
versionCode 32
versionName "1.0.32"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation project(':easy_sharedpreference_library')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'org.jsoup:jsoup:1.10.3'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.github.lolucosmin:PermissionsWrapper:version_1.2'
implementation 'com.artjimlop:altex-image-downloader:0.0.4'
implementation 'com.daimajia.numberprogressbar:library:1.4#aar'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.webianks.library:easy-feedback:1.0.2'
implementation 'com.github.clans:fab:1.6.4'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.google.android.ads.consent:consent-library:1.0.6'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.4'
testImplementation 'junit:junit:4.12'
implementation project(':library')
}
apply plugin: 'com.google.gms.google-services'
repositories {
mavenCentral()
google()
}

The gradle build keep showing me this error about Kotlin version:
Answer
Open your project level build.gradle file,
there you'll find a block named buildscript.
Go to that block and find if there is a variable named ext.kotlin_version
Change it to your latest version of Kotlin plugin.
all com.android.support libraries must use the exact same version
specification.
Issue for this is that the library you're using easy-feedback is having different version for support library (v25) than you're using (v28).
Solution is to exclude your support library from that dependency like below:
implementation ('com.webianks.library:easy-feedback:1.0.2', {
exclude group: 'com.android.support'
})
Note : If problem still persist, then check it with other 3rd party dependencies too.

Related

When I run my old android project I get a error message from the build.gradle

When I run my old android project I get a error message:
"WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Affected Modules: app"
I tried to use the google()in allprojects but get the same error message.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.android.firebaseupload"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:appcompat-v7:27.0.+'
implementation 'com.google.firebase:firebase-storage:17.0.0'
implementation 'com.google.firebase:firebase-auth:17.0.0'
implementation 'com.google.firebase:firebase-database:17.0.0'
implementation 'com.github.gcacace:signature-pad:1.2.1'
implementation 'com.squareup.picasso:picasso:2.5.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:recyclerview-v7:27.0.0'
implementation 'com.android.support:cardview-v7:27.0.0'
implementation 'com.firebaseui:firebase-ui-database:0.4.0'
implementation 'com.android.support:design:27.0.0'
implementation 'com.android.support:support-v4:27.0.0'
implementation 'com.google.android.gms:play-services-plus:17.0.0'
testImplementation 'junit:junit:4.12'
}
}
apply plugin: 'com.google.gms.google-services'
"WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Affected Modules: app"
It looks that the problem is from:
implementation 'com.github.gcacace:signature-pad:1.2.1'
Check out this link
[https://github.com/gcacace/android-signaturepad/blob/master/SignaturePad-Example/build.gradle][1]
it looks that the developer haven't updated his code since a while so the solution in your case is to :
1- Download https://github.com/gcacace/android-signaturepad as zip
2- Open its Gradle files in app modules and replace compile with implementation
3- After making sure that there's no Compile keyword any more, go to Android project in Android studio Click file->New->Import Module->select the folder where you extracted the project and edited it and that's it
make sure that all of your dependencies are using the latest version
try add
apply plugin: 'com.google.gms.google-services'
in second line of your gradle file

Cannot access zzbfm class file for com.google.android.gms.internal.zzbfm not found

I am migrating my Android app project from GCM to FCM. For this I use Firebase assistant tool in Android Studio and followed instructions from Google developer guide. Everything went fine and changed my app code for FCM according to Assistant tool. Now, its time to run and test app. And I got following strange error :
cannot access zzbfm class file for com.google.android.gms.internal.zzbfm not found
I am getting this error where I am using google maps and trying to set marker position.
Here's my app level gradle :
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'
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
maven { url 'https://dl.bintray.com/kennyc1012/maven' }
}
android {
signingConfigs {
msapp {
}
}
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.package"
minSdkVersion 16
targetSdkVersion 28
multiDexEnabled true
useLibrary 'org.apache.http.legacy'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
//Default
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.firebase:firebase-messaging:11.8.0'
testImplementation 'junit:junit:4.12'
//modules
implementation 'com.facebook.android:facebook-android-sdk:4.+'
//jar files
implementation files('libs/classes.jar')
implementation files('libs/YouTubeAndroidPlayerApi.jar')
//google repos
implementation 'com.android.support:appcompat-v7:26.0.0'
implementation 'com.android.support:support-v4:26.0.0'
implementation 'com.android.support:recyclerview-v7:26.0.0'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.android.support:design:26.0.0'
//square lib
implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
//compile 'com.squareup.leakcanary:leakcanary-android:1.5'
//text manupulation
implementation 'commons-lang:commons-lang:2.6'
//permission library.
implementation 'com.karumi:dexter:5.0.0'
implementation 'com.google.firebase:firebase-core:16.0.3'
}
apply plugin: 'com.google.gms.google-services'
To resolve your problem, first i will ask you to always use specified and updated version.
1. Replace + with specific version here : classpath 'io.fabric.tools:gradle:1.25.4'
2. Try to use same version for now to run the apk,
compileSdkVersion 27
buildToolsVersion '27.0.3'
targetSdkVersion 27
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
3. Use an updated version of google play service
implementation 'com.google.android.gms:play-services:16.0.3'
implementation 'com.google.android.gms:play-services-analytics:16.0.3'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
This will fix your problem.
Please Change your Firebase and Google Library to same version .
For an Example like this
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
//your firebase lib version to the same version
implementation 'com.google.firebase:firebase-core:12.0.1'
In most cases is required to upgrade play-services and firebase version dependencies, maybe the last one available if you are using androidx but if not:
Try to check it out the maven_repository and choose some version that helps you fix it. For example:
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
the chosen version is the last one before version 17 due to the v17.0.0 require androidx (in play-service)
Don't forget to update your google-service in your build.gradle(project)
classpath 'com.google.gms:google-services:4.3.0'
I encountered same issue after migrating AndroidX and
Solved by changing version of gms library for maps and location as below
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
According to the official documentation regarding Latest SDK versions, please change the following line of code:
implementation 'com.google.firebase:firebase-messaging:11.8.0'
to
implementation 'com.google.firebase:firebase-messaging:17.3.1'
And according to official documentation regarding on to set up Google Play Services, please change the follwing lines of code:
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.google.android.gms:play-services-analytics:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
to
//implementation 'com.google.android.gms:play-services:11.8.0' //Commented line
implementation 'com.google.android.gms:play-services-analytics:16.0.3'
implementation 'com.google.android.gms:play-services-maps:15.0.1
Please also be sure to have:
classpath 'com.google.gms:google-services:4.1.0'
In your top level build.gradle file.
Just update versions of libraries "......gms:play-services....." to the latest
To check the latest versions, refer this link

Failed to resolve: com.google.android.material:material:1.0.0-alpha1

So I'm following the official documentation to add the Material Components library to my project https://github.com/material-components/material-components-android/blob/master/docs/getting-started.md
But it throws me the following error
"Failed to resolve: com.google.android.material:material:1.0.0-alpha1"
I've tried installing the repository and sync project that Android Studio suggest to no avail.
My project config
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url "https://maven.google.com"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and the app config
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "mlluell.eftremp"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.firebase:firebase-database:15.0.1'
implementation 'com.google.firebase:firebase-storage:15.0.2'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.google.android.material:material:1.0.0-alpha1'
//imatges recyclerview
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:3.3.0'
// FirebaseUI for Firebase Auth
implementation 'com.firebaseui:firebase-ui-auth:3.3.0'
// FirebaseUI for Cloud Storage
implementation 'com.firebaseui:firebase-ui-storage:3.3.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
Instead of:
implementation 'com.google.android.material:material:1.1.0'
Use:
implementation group: 'com.google.android.material', name: 'material', version: '1.1.0-alpha05'
And it works.
Thought I'd share what fixed this for me now that I|O has started.
I had about the same initial setup as you. To get it working I had to change the following:
compileSdkVersion to 'android-P'
Support Libraries to '28.0.0-alpha1'
include api 'com.android.support:design:28.0.0-alpha1' in the dependencies block.
SDK Platform update - Android P Preview (latest)
targetSdkVersion 'P'
I then did the ritualistic 'Invalidate Caches / Restart' and rebuilt the project for good measure.
FOR ANDROIDX USERS:
You can implement as follows:
AndroidX:
implementation 'com.google.android.material:material:1.0.0'
Old build artifact users can use the following implementation:
implementation 'com.android.support:design:[Enter Design library version here]'
Use that version without square brackets.
You can find design library version via this link : https://mvnrepository.com/artifact/com.android.support/design/28.0.0
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
androidTestImplementation 'androidx.test:runner:1.2.0'`
Well that happened to me an hour ago...
I always suggest check the most basic issues for example:
Go to >> Gradle module.app:
implementation 'com.google.android.material:material:1.2.1'
When you have a syntax's error; Failed to resolve: com.google.android.material:material:x.x.x appears.
Have a great day!
Make sure your gradle.properties enabled AndroidX using the following Line:
android.useAndroidX = true
If not added then add this line and sync project again
Visit For More Details
For androidx users:
My problem got solved by just updating all the dependencies with latest version. It got solved in just 2 minutes. My previous version was 1.0.2 and showed same error. I just clicked on 'Show in Project Structure dialog' which appeared below the error. From there you will get options to update dependencies to latest version. For users other than androidx might be the same soution works.

Program type already present: com.google.android.gms.internal.zzfq

I getting this error. Despite trying all thing I am unable to resolve it. Please help me.
Things that I tried are:
Delete .build, .idea etc then rebuild
Clean and rebuild
Change version of compile library
Thank you
plugins
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'
Android
android {
dexOptions {
preDexLibraries = false
javaMaxHeapSize "2g"
}
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.funzone.alarmnap"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
multiDexEnabled true
versionName "1.1"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Greendao Plugin
apply plugin: 'org.greenrobot.greendao'
greendao {
targetGenDir 'src/main/java'
schemaVersion 2
}
All libraries:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.jjoe64:graphview:4.2.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.facebook.android:audience-network-sdk:4.+'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.facebook.android:notifications:1.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'org.greenrobot:greendao:3.2.2'
testImplementation 'junit:junit:4.12'
testImplementation "org.robolectric:shadows-multidex:3.0"
testImplementation 'org.robolectric:robolectric:3.4.2'
implementation 'com.android.support:preference-v7:27.1.0'
}
repositories {
mavenCentral()
google()
}
Google plugin
apply plugin: 'com.google.gms.google-services'
I fix the same issue in my project - after updating the Kotlin plugin to 1.2.41 (I don't know if it is really related. Edit: apparently this is not related with Kotlin) - with :
classpath 'com.google.gms:google-services:3.2.1'
https://developers.google.com/android/guides/google-services-plugin
Remark: I could stay with the unique 15.0.0 Google Play Services libraries version but not the play-services-tagmanager one and firebase :
implementation "com.google.android.gms:play-services-tagmanager:15.0.2"
implementation "com.google.firebase:firebase-core:15.0.2"
The project is compiling now.
set implementation 'com.google.firebase:firebase-messaging:15.0.2' at the app level build.gradle file, if you are using firebase
set classpath 'com.google.gms:google-services:3.2.0' at the project level build.gradle file
Then sync the build.gradle files
classpath 'com.google.gms:google-services:3.2.0'
and
//Firebase
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.firebase:firebase-database:15.0.1'
You will need to update the version of the individual libraries. This addresses the issue where version 3.3.0 of the Google Services Gradle plugin reports: The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.0,15.0.0], [15.0.2,15.0.2]], but resolves to 15.0.2...
For more info regarding the latest update check release updates from below link
Firebase May 2nd release notes
I started seeing this after I upgraded to kotlin plugin version : 1.2.41-release-Studio3.1-1.
Upgrading firebase-core and firebase-messaging from 15.0.0 --> 15.0.2. Fixed the problem, database, auth and gms-auth-services are at 15.0.0
I fixed the issue using new firebase independent version numbers
https://firebase.google.com/support/release-notes/android#latest_sdk_versions
SDK Update - May 2, 2018 -> Firebase Android SDKs now have independent version numbers, allowing for more frequent, flexible updates.
I had the same error and I fixed it updating lines below:
build.grade (Project: [project_name])
classpath 'com.google.gms:google-services:3.3.0'
build.grade (Module: app)
implementation 'com.firebaseui:firebase-ui-auth:3.3.1'
I hope it helps.
I had the same exact error.
I was using
implementation 'com.firebaseui:firebase-ui-auth:3.2.2'
I solved it updating to
implementation 'com.firebaseui:firebase-ui-auth:3.3.0'
Another possible cause/fix might be the build.gradle at project level
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
This is very boring. Google should review these updates better. I tried everything, but my issue was only fixed by returning the version of the Google Play Services APIs:
implementation 'com.google.android.gms:play-services-gcm:11.8.0'
Go to the folllowing link :
https://firebase.google.com/support/release-notes/android
and check for the latest firebase dependencies with the current compatible google play service version as shown in the screenshot below.
For me the problem was
dependencies {
classpath 'com.google.firebase:firebase-plugins:1.1.5'
}
used for Performance Monitoring. Just commented out.
I had the same issue, the thing which is causing this error is 2 versions of same dependency with different services
I changed this:
implementation 'com.google.android.gms:play-services-ads:17.1.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.5'
To:
implementation 'com.google.android.gms:play-services-ads:17.1.1'
these versions are importing same subpackages which is why it is a ambiguity error basically same subpackage is imported from 2 different dependencies (in background)
Have fun coding!!

Android Studio 3.0 Warning: Using incompatible plugins for the annotation processing

After update Android Studio to 3.0 version I have warning:
Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProcessor' configuration instead.
I tried to rewrite my gradle source ,but I still have a warning.
Here is a source
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'io.realm:realm-gradle-plugin:0.89.+'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.syncapp"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.11'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:support-v4:27.0.1'
implementation 'com.android.support:appcompat-v7:27.0.1'
implementation 'com.android.support:design:27.0.1'
compile 'org.greenrobot:eventbus:3.1.1'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp:okhttp:2.7.5'
compile 'com.squareup.okhttp:mockwebserver:2.7.5'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.google.dagger:dagger:2.4'
annotationProcessor 'com.google.dagger:dagger-compiler:2.4'
}
apply plugin: 'realm-android'
As you can see,in my project I'm using butterknife,dagger,okhttp,retrofit2 and eventbus support libraries
Any solution? I can't run my app
Thanks
Remove apt plugin from your build.gradle file. And wherever in dependency you are using apt replace it with annotationProcessor. Moreover update your realm dependency version to 4.1.1 as well.
Did you have a look at this link?
Basically:
If you are experiencing issues migrating to the new dependency resolution >strategy, you can restore behavior to that of Android plugin 2.3.0 by setting >includeCompileClasspath true.
android {
...
defaultConfig {
...
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
}
}
then you can opt to remove the Apt plugin to make the project cleaner but consider that should not affect according to the official documentation
android-apt plugin users: This behavior change currently does not affect the >android-apt plugin. However, the plugin will not be compatible with future >versions of the Android plugin for Gradle
Also when yuo migrate to Android Studio 3.0 you should not use compile but implementation for every dependency
What also you should do is to try to upgrade or downgrade the annotation processor dependecies you have with Dagger or Butterknife, if does not work try to remove Butterknife(but I am not sure about that if the Dagger one is enough, anyway you should not need).

Categories

Resources