After updating to the latest Android studio Canary...
# android
s
After updating to the latest Android studio Canary and AGP-alpha15, all my android config in gradle kotlin became undefined. As if the AGP doesn't exist.
2
m
is this M1 version?
In my case, I’m unable to open the file
s
What is M1?
I looked a bit into it and versionName and versionCode are no longer in the DSL for libraries. remove all lines like from library gradle scripts
Copy code
versionCode = 1
versionName = "1.0"
m
Apple Silicon Support (M1)
🚫 1
a
It's likely because the Gradle version you are using is earlier than 7.0.
m
s
it changed
Copy code
defaultConfig {
    applicationId "<http://mock.hello.com|mock.hello.com>"
    minSdk 21
    targetSdk 30
    versionCode 1
    versionName "1.0"

    vectorDrawables {
        useSupportLibrary true
    }
}
@miqbaldc - It works fine, it is really fast. I downloaded and tried Mac (Apple Silicon): android-studio-2020.3.1.15-mac_arm.zip
s
I meant a library modules build script. Also Kotlin DSL. Would be nice to know what happened.
l
@Saiedmomen There's a bunch of things that broke for Kotlin DSL users, yep, but it'll be resolved in next Canary. There's workarounds for all the issues, but without clear and exact info on what you're unable to fix yourself with build errors, I cannot help.
1
s
@louiscad I managed to solve it myself by removing the
vesionCode
and
versionName
from the
android.defaultConfig
block. I just want to know if it is an api change or a bug.
l
It's not a bug, it's the way it should always have been.
🙏 1