Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run nor debug project but gradle build+install work

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 I've got error:

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
  > Entry name 'firebase-abt.properties' collided

But when I delete build directory (rm -rf app/build), I can run/debug project once time. After the first run, it is again with the same error with collision.

I try clear cache, restart the Android studio, but it didn't help.

Maybe it is not related to Android studio, because different project running ok. Do you have any idea, what the problem may be?

like image 923
Rado Dr. Avatar asked Sep 17 '19 13:09

Rado Dr.


People also ask

How do I fix build Gradle?

For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.

Why is my Gradle build failing?

If gradle --version works, but all of your builds fail with the same error, it is possible there is a problem with one of your Gradle build configuration scripts. You can verify the problem is with Gradle scripts by running gradle help which executes configuration scripts, but no Gradle tasks.


3 Answers

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

like image 116
Sdghasemi Avatar answered Oct 09 '22 13:10

Sdghasemi


I had a similar issue with Android Studio 3.6 Canary 12 on Mac, I could build different build variants but had this error when I tried to Generate a signed apk:

Entry name 'kotlin/collections/MapWithDefault.kotlin_metadata' collided

I had to delete the .build folder as well as the folders where I build my build variant.

like image 32
MrEngineer13 Avatar answered Oct 09 '22 14:10

MrEngineer13


I faced somehow similar issue on Android Studio 3.6.3v

Entry name 'kotlin/collections/MapWithDefault.kotlin_metadata' collided

I resolved the issue by:

  1. Delete build folder under /app
  2. Clean project
  3. Rebuild project

If still doesn't work, do the following:

File > Invalidate Caches/Restart
like image 37
Waqar UlHaq Avatar answered Oct 09 '22 13:10

Waqar UlHaq