Hi guys yesterday I received Android Studio 3.0 update and I immediately decided to update my Android Studio from 2.3.1 to 3.0.
And I faced some issues and than fixed those after going through different stack overflow posts. so I decided to mention all issues which You also can face when You will updated to Android Studio 3.0.
After this You will be prompted to update Gradle plugin and gradle version for Android. Lets updated Gradle also.
Now Your gradle wrapper file will have this version of gradle.
gradle-4.1-all.zip
Now gradle sync will fail and you will be prompted to remove buildToolsVersion.
You need to use new dependency configurations in Android Studio 3.0.
Change compile configuration to implementation and api. compile configuration is deprected now.
implementation configuration means that the dependency is only available to other modules at run time. this will drastically improve gradle build time.
you also have to exclude application dependencies from test dependecnies, because now test dependencies inherit implementation when gradle resolves application configurations.
Now you can face this issue
You will face this issue because buildTypes in app build.gradle file should match with module build.gradle file.
This was my build types block in app gralde file
buildTypes { staging { buildConfigField 'String', 'HOST', '"http://compute.amazonaws.com/"' buildConfigField 'String', 'REGION_CODE', '"1"' debuggable true signingConfig signingConfigs.debug } QA { buildConfigField 'String', 'HOST', '"com.amazo/"' buildConfigField 'String', 'REGION_CODE', '"92"' debuggable true signingConfig signingConfigs.debug } notificationTest { buildConfigField 'String', 'HOST', '"http://a6a"' buildConfigField 'String', 'REGION_CODE', '"92"' debuggable true signingConfig signingConfigs.debug } }
and this was my project dependencies
compile project(':slideDateTimePicker') compile project(':scatter')
I opened scatter build.gradle and slideDateTimePicker build.gradle files and replaced android block with this one.
buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } QA {} notificationTest{} releaseApp {} releaseSdk {} staging{} }
Now You can face this issue (most probably) 🙂
Add this in app gradle build file before android block (on top)
//noinspection GradleCompatible apply plugin: 'com.android.application' apply plugin: 'me.tatarka.retrolambda'
tasks.whenTaskAdded { task -> if (task.name.startsWith("lint")) { task.enabled = false } }
retrolambda { jvmArgs '-noverify' }
and I also changed my class path version from 3.4.0 to 3.2.5 and my issue resolved.
Also no need to add retroLambdaConfig inside dependencies block.
Now I am running my older project successfully in Android Studio 3.0
Happy Coding 🙂 … share this with other developers. Thank you for reading.
Tags : Android Studio 3.0 Update available, migrating to Android Studio 3.0, Updating 3.0, Errors, Android Studio latest stable version 3.0 update, automatically update Android Studio 3.0, stable release, Configure IDE, Settings, Setup Android Studio 3.0 , resolve dependencies, Update existing project in Android Studio 3.0 , retrolambda, tatarka, config.