I have a Flutter app, and I encounter Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.multidex.MultiDexApplication" on path: DexPathList[[]
error when debugging it over Wi-Fi on a physical device.
android/app/build.gradle
multiDexEnabled true
and
multiDexKeepFile file('multidex-main-dex-list.txt')
multiDexKeepProguard file('multidex-config.pro')
and
implementation 'androidx.multidex:multidex:1.0.1'
AndroidManifest.xml
<application
android:name="androidx.multidex.MultiDexApplication" >
...
</application>
<application
android:name="android.support.multidex.MultiDexApplication"
multidex-main-dex-list.txt
com/google/firebase/provider/FirebaseInitProvider.class
Any suggestions?? Thanks for trying help!
I found a solution for this. If your minSdkVersion is over 21 you dont need to implement multidex. So i have changed my minSdkVersion to 23 and removed all multidex lines than it fixed my problem.