scenarios while implementing MultiDex in Android 14 using Gradle with Kotlin
I'm reviewing some code and I'm deploying to production and I've been banging my head against this for hours. I'm working with an scenario with MultiDex when trying to build my Android app targeting Android 14. My app has grown quite large, and I need to enable MultiDex support. I've added the necessary dependencies in my `build.gradle` file, but I'm working with a `java.lang.RuntimeException: Unable to instantiate application` behavior at runtime. Here's what I've tried: In my `app/build.gradle`, I've included the following: ```groovy android { defaultConfig { applicationId "com.example.myapp" minSdkVersion 21 targetSdkVersion 14 versionCode 1 versionName "1.0" multiDexEnabled true } } dependencies { implementation 'com.android.support:multidex:1.0.3' // Other dependencies } ``` I've also specified the `MultiDexApplication` in my `AndroidManifest.xml`: ```xml <application android:name="android.support.multidex.MultiDexApplication" ... > <activity ...> </activity> </application> ``` However, the app crashes immediately upon launch, and the logcat shows the behavior: ``` java.lang.RuntimeException: Unable to instantiate application com.example.myapp.MyApplication: java.lang.ClassNotFoundException: Didn't find class "com.example.myapp.MyApplication" on path: DexPathList[[zip file "file:///data/app/com.example.myapp-1/base.apk"],nativeLibraryDirectories=[...] ] ``` I've tried cleaning and rebuilding the project multiple times, and I've even cleared the app data on my device. I'm running this on an emulator with a configured API level of 14. Is there something I am missing in the configuration? Any insights would be greatly appreciated. What's the best practice here? Thanks in advance!