After update to Android studio 3.6 Canary11 (macOS) I cannot run nor run Debug variants of my project (Release variants working fine).
When I try to run the project
When getting a entry name 'kotlin/collections/mapwithdefault.kotlin_metadata' collided
error in Android Studio v3.6.1 it helped cleaning the build folders.
We ended up creating a script for this: cleanBuldFolders.sh
#!/bin/bash
# Deletes all build folders in the project
find . -name build -type d -exec rm -rf {} +
I faced the same problem. I just clean and rebuild, and it's working fine after that.
Entry name 'res/mipmap-hdpi-v4/ic_launcher.png' collided
Tried the article https://medium.com/@elye.project/resources-collision-without-warning-b29294f518c6 by Elye. I am using a library where ic_launcher is also defined. I renamed the ic_launcher according to recommendations in the article, but that did not solve the problem.
Tried to clear the cache by deleting the build and gradle directory, but that did not solve the problem.
Tried to set in gradle.properties:android.useNewApkCreator=false
but then Android Studio reports:
build.gradle: The option setting android.useNewApkCreator=false
is experimental and unsupported.
Since I am not up to using experimental features, I downgraded from:
Gradle Version: 3.6.1
Android Plugin version: 6.2.1
to:
Gradle Version: 3.5.3
Android Plugin version: 5.4.1
Compilation (debug) now works again.
I faced the same issue when using Android Studio 4.0 Canary 8.
I solved my problem by downgrading from:
Gradle version 3.6.3
to 3.5.3
Android plugin version 5.6.1
to 5.4.1
BUT
I would suggest try these below options before downgrading
build
folder inside app
If you still face the issue, try Invalidate Cache / Restart
Delete apk file from subfolders project
I was facing the same error as MrEngineer13. After hours of struggle turns out you have to delete the built APK files for the project to build another APK successfully