That is because you enabled multiDex for release builds only, not for debug builds.
Try this:
defaultConfig {
multiDexEnabled true
}
More Related Contents:
- Building and running app via Gradle and Android Studio is slower than via Eclipse
- Android Studio gradle takes too long to build
- What does “Program type already present” mean?
- Gradle: Execution failed for task ‘:processDebugManifest’
- Using Build Flavors – Structuring source folders and build.gradle correctly
- No matching client found for package name (Google Analytics) – multiple productFlavors & buildTypes
- Android Studio: Gradle – build fails — Execution failed for task ‘:dexDebug’
- Android Studio Gradle Configuration with name ‘default’ not found
- gradle – library duplicates in dependencies
- Android Studio – Importing external Library/Jar
- Android studio Gradle icon error, Manifest Merger
- NDK Resolution Outcome: Project settings: Gradle model version=5.4.1, NDK version is UNKNOWN error
- Error:Failed to open zip file. Gradle’s dependency cache may be corrupt
- findFragmentById for SupportMapFragment returns null in Android Studio
- Error:Cause: unable to find valid certification path to requested target
- Sign APK without putting keystore info in build.gradle
- How to create an Android Library Jar with gradle without publicly revealing source code?
- Gradle and Multi-Project structure
- Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication ?Android
- Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml
- Android Studio: “Execution failed for task ‘:app:mergeDebugResources’” if project is created on drive C:
- Error “Gradle sync failed: Connection refused: connect”
- Android Studio: Android Manifest doesn’t exists or has incorrect root tag
- How to downgrade to older version of Gradle
- Add ViewPagerIndicator to Android Studio
- How to replace a string for a buildvariant with gradle in android studio?
- Gradle failed to sync with ‘unable to find optional library’
- No Cached Version Gradle Plugin Available for offline mode
- Build variants in Gradle for a Library Project in Android
- Importing gradle project to eclipse