https://kotlinlang.org logo
#android
Title
# android
t

Thiago

01/03/2018, 7:20 PM
I pasted the file into the class, but it did not convert directly. Is there any option that should be enabled?
a

adam-mcneilly

01/03/2018, 7:22 PM
Hmm I'm not sure Android Studio should have done it. My guess is that it would look like this:
Copy code
override fun attachBaseContext(base: Context) {
   super.attachBaseContext(base)
   Multidex.install(this)
}
t

Thiago

01/03/2018, 7:24 PM
Thank you. But Multidex continues with the error red color.
a

adam-mcneilly

01/03/2018, 7:26 PM
What's the error you get?
t

Thiago

01/03/2018, 7:39 PM
Multidex.install(this) --> Unresolved reference
"Multidex"
a

adam-mcneilly

01/03/2018, 7:41 PM
Is there a support lib for multidex you need to do? something like
implementation "com.android.support:multidex:26.0.2"
? I'm just guessing based on the way the docs put it in a support package - https://developer.android.com/reference/android/support/multidex/MultiDex.html
t

Thiago

01/03/2018, 7:49 PM
As of version 21 it is not necessary this dependence
a

adam-mcneilly

01/03/2018, 7:50 PM
I'm not sure then sorry. I don't have AS open to try to recreate right now. ¯\_(ツ)_/¯
t

Thiago

01/03/2018, 7:52 PM
Thanks a lot for the help
👍 1
s

sourabhv

01/04/2018, 2:16 AM
@Thiago I think as of API 21 it is not required to multidex. But to multidex for lower APIs you do need the support lib
t

Thiago

01/04/2018, 10:21 AM
Required by Multidex in Application
k

kingsley

01/04/2018, 10:41 AM
In addition to adding the Multidex dependency, you also need to enable multidex in your
build.gradle
file