Showing posts with label gradle. Show all posts
Showing posts with label gradle. Show all posts

Thursday, October 26, 2017

Fix issues After updating to Android Studio 3.0

Now I have my own blog.



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.


Lets update and Restart (Android studio update available)

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 (I am telling my scenario :) )
First of all remove buildToolsVersion
No need of it now.
Now you can face this issue

Android studio 3.0: Unable to resolve dependency for ‘:app@dexOptions/compileClasspath’: Could not resolve project :projectName

You will face this issue because buildTypes in app build.gradle file should match with module build.gradle file.

Lets resolve this issue.

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')
Happy Coding :) … share this with other developers. Thank you for reading.

Kotlin Android MVP Dagger 2 Retrofit Tutorial

http://developine.com/building-android-mvp-app-in-kotlin-using-dagger-retrofit/