I pasted the file into the class, but it did not c...
# android
t
I pasted the file into the class, but it did not convert directly. Is there any option that should be enabled?
a
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
Thank you. But Multidex continues with the error red color.
a
What's the error you get?
t
Multidex.install(this) --> Unresolved reference
"Multidex"
a
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
As of version 21 it is not necessary this dependence
a
I'm not sure then sorry. I don't have AS open to try to recreate right now. ¯\_(ツ)_/¯
t
Thanks a lot for the help
👍 1
s
@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
Required by Multidex in Application
k
In addition to adding the Multidex dependency, you also need to enable multidex in your
build.gradle
file