None of the answers they gave you was exhaustive.
The problem lies in the Multidex.
You must add the library in the app gradle :
implementation 'com.android.support:multidex:1.0.3'
After, add in the defaultConfig of the app gradle :
multiDexEnabled true
Your Application must be of the Multidex type..
You must write it in the manifest :
android:name=".MyApplication"
"MyApplication" must be either the Multidex class, or it must extend it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…