Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by MaceB · Mar 28, 2020 at 12:01 AM · buildbuild-errorandroid buildapkbuild error

Android APK Build Failing "Execution failed for task ':launcher:checkReleaseDuplicateClasses'."

I'm trying to make an APK build but I'm getting the following errors:


FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (:androidx.core.core-1.0.0:) and classes.jar (:com.android.support.support-compat-26.1.0:)


...along with 330 other similar errors which I believe to be related. (I will leave the full error message in a comment below).

I'm not very knowledgeable about these sorts of issues so a dumbed-down solution would be appreciated.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MaceB · Mar 28, 2020 at 08:17 AM 0
Share

There's a character count limit so here's what I can put:


CommandInvokationFailure: Gradle build failed. /Applications/Unity/Hub/Editor/2019.3.7f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2019.3.7f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-5.1.1.jar" org.gradle.launcher.Gradle$$anonymous$$ain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':launcher:checkReleaseDuplicateClasses'.

    1 exception was raised by workers:

    java.lang.RuntimeException: Duplicate class android.support.v4.app.INotificationSideChannel found in modules classes.jar (:androidx.core.core-1.0.0:) and classes.jar (:com.android.support.support-compat-26.1.0:) Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules classes.jar (:androidx.core.core-1.0.0:) and classes.jar (:com.android.support.support-compat-26.1.0:) Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules classes.jar (:androidx.core.core-1.0.0:) and classes.jar (:com.android.support.support-compat-26.1.0:) Duplicate class android.support.v4.media.$$anonymous$$ediaBrowserCompat found in modules classes.jar (:androidx.media.media-1.0.0:) and classes.jar (:com.android.support.support-media-compat-26.1.0:) Duplicate class android.support.v4.media.$$anonymous$$ediaBrowserCompat$CallbackHandler found in modules classes.jar (:androidx.media.media-1.0.0:) and classes.jar (:com.android.support.support-media-compat-26.1.0:) Duplicate class android.support.v4.media.$$anonymous$$ediaBrowserCompat$ConnectionCallback found in modules classes.jar (:androidx.media.media-1.0.0:) and classes.jar (:com.android.support.support-media-compat-26.1.0:) Duplicate class android.support.v4.media.$$anonymous$$ediaBrowserCompat$ConnectionCallback$ConnectionCallbackInternal found in modules classes.jar (:androidx.media.media-1.0.0:) and classes.jar (:com.android.support.support-media-compat-26.1.0:) Duplicate class android.support.v4.media.$$anonymous$$ediaBrowserCompat$ConnectionCallback$StubApi21 found in modules classes.jar (:androidx.media.media-1.0.0:) and classes.jar (:com.android.support.support-media-compat-26.1.0:) Duplicate class android.support.v4.media.$$anonymous$$ediaBrowserCompat$CustomActionCallback found in modules classes.jar (:androidx.media.media-1.0.0:) and classes.jar (:com.android.support.support-media-compat-26.1.0:) Duplicate class android.support.v4.media.$$anonymous$$ediaBrowserCompat$CustomActionResultReceiver found in modules classes.jar (:androidx.media.media-1.0.0:) and classes.jar (:com.android.support.support-media-compat-26.1.0:) Duplicate class android.support.v4.media.$$anonymous$$ediaBrowserCompat$ItemCallback found in modules classes.jar (:androidx.media.media-1.0.0:) and classes.jar (:com.android.support.support-media-compat-26.1.0:)
avatar image alex_roboto · Apr 16, 2020 at 04:22 AM 0
Share

I am seeing the exact same problem. From my research something is pulling in a non-AndroidX version of that class. The jetifier is supposed to fix those to all use AndroidX but for some reason it's not. But sorry, I have not solved it yet.

5 Replies

· Add your reply
  • Sort: 
avatar image
14

Answer by _uso212 · Dec 23, 2020 at 12:40 AM

I'm having the same issue, I change the Gradle Properties to use Jettifier, change the AndroidManifest.xml but still nothing, would appreciate if someone can help T_T

EDIT

I fixed it by going to Assets > Play Services Resolver > Android Resolver > Delete Resolved Libraries.

Comment
Add comment · Show 15 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Moonwalker777 · Dec 24, 2020 at 06:40 AM 0
Share

This solved my problem, thank you!

avatar image _uso212 Moonwalker777 · Dec 29, 2020 at 11:02 PM 0
Share

You're welcome, glad I could help.

avatar image anmol07goyal · Dec 29, 2020 at 07:34 AM 0
Share

with this the apk build successfully but the game wouldn't even open any thing that i might have been doing wrong??

avatar image _uso212 anmol07goyal · Dec 29, 2020 at 11:01 PM 0
Share

It happened to me as well. But that was due to Facebook SDK not being implemented correctly (I had to switch to a different version). You could check your crash log to see what exactly made your application crash on start.

avatar image sonar004 · Jun 26, 2021 at 08:08 PM 1
Share

God bless you, dear friend. I can't avoid the feeling that without this answer I would be spending days for nothing...

avatar image Lenvanthis012 · Sep 22, 2021 at 10:32 PM 1
Share

This resolved my problem too. Thanks.

avatar image eyupunity · May 06 at 02:31 PM 1
Share

Thank you, really saved me, I was struggling with this over a day

avatar image BjoUnity3d eyupunity · May 06 at 08:24 PM 0
Share

Are you sure it fixed it because by deleting the libraries it's likely something will not work although you might not realize it unless you look at the console while running the app. It certainly didn't solve it for Firebase + Vuforia as all the Firebase functions failed. I had to report it to Vuforia and they released an update which fixed the issue.

avatar image eyupunity BjoUnity3d · May 07 at 05:31 PM 0
Share

yes it helped me to get an debuggable apk, the reason of my issue was Facebook sdk, no firebase or Vuforia

Show more comments
avatar image
1

Answer by ffdev78 · Aug 09, 2021 at 10:19 AM

I've fixed that issue by deleting the playcore.arr file from the Assets/GooglePlayPlugins/com.google.play.core/Runtime/Plugins folder

alt text


gladle-issue.png (90.4 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Elizeu159 · Jul 22, 2020 at 08:55 PM

Same for me. I'm using Firebase and Facebook sdk. Everything works perfect on ios but i cant build on android, the only way for it to build is if i completely delete the plugins folder, but then firebase won't start of course.

Tried using every version of 2019.3 and 2019.4 on mac, same 498 duplicate classes errors everytime.

Also tried:

  • Deleting resolved libraries

  • Resolve / Force Resolve

  • Update version handler

  • disable patch mainTemplate.gradle

  • deleting the sdk 14 or something on firebase AndroidManifest

  • updating and downgrading all plugins (now they are all in their latest version)

  • deleting library

  • deleting the folder, creating a new one and transfering packages and assets folders into it

  • restarting computer

  • everything in every thread ever

:P

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image anmol07goyal · Dec 29, 2020 at 06:49 AM 0
Share

hey, u found any solution?

avatar image
0

Answer by digitalmkt · Jan 19, 2021 at 08:44 PM

Same here. Any resolution? Thanks.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by ertbaran · May 21 at 05:20 AM

I use Mediation for ad. And my solution was just remove the "Advertisement" package on Package Manager from "In Project" tab.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

151 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

CommandInvokationFailure: Gradle build failed. when building app bundle 0 Answers

[ERROR ][Android Build] [5.3.4] Not able to build 1 Answer

Gradle Build Error 1 Answer

UnauthorizedAccessException during Unity Build for Android 2 Answers

I can't build a game for android 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges