Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
4
Question by siddharth3322 · Aug 07, 2014 at 10:17 AM · androidbuild-errorandroidplugin

Multiple plugin conflict

At present I am facing problem by using multiple plugin. I have integrated three plugin into same project named as

  1. Admob Ads

  2. Mobile Social Plugin

  3. IABCombo

First I have first two plugins implemented and everything works fine next I add third plugin, it now showing following message when I try to build it in android. Following image represent generated message.

As per my analysis for this problem is that: Unity combine all jar files classes and then use it. So at present there are multiple copies of classes exist after adding third plugin.

I can't able to figure out how to handle this problem?? Provide some guidance about this problem because I know there are lots of developer facing same problem.

alt text

buildfailure.png (18.1 kB)
Comment
Add comment
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

8 Replies

· Add your reply
  • Sort: 
avatar image
28
Best Answer

Answer by liortal · Aug 08, 2014 at 09:20 PM

First off, for general knowledge, DEX is the process that takes code files (whether it's your code, or code that is provided in libraries) and converts it into the DEX format (Dalvik Executable).

Libraries are only used for convenience during development: when you build your game, there's no notion of libraries anymore - it's all just compiled code.

For this reason, when 2 or more plugins reference the same library (contain 2 copies of a referenced JAR) or define a class with the same name, a conflict occurs, causing this error.

For example: if you are using 2 plugins in your Unity project and both contain a copy of GooglePlayServices.jar, DEX will fail to build your game, since it will try to process multiple copies of the same class.

In your case, it is not clear whether this is the case (multiple copies of the same jar) or whether it's multiple copies of the same class.

The first one is easier to spot (look for multiple copies of the same JAR). the 2nd one is trickier but it will help if you provided some more information (e.g: is there any extra information in the Unity console? the DEX tool should provide the name of the class that causes the failure for example).

NOTE: In some cases, it gets tricky to find out why the build fails. If all else fails, I offer my help to fix Android related build issues (due to manifest merging, conflicting plugins, etc). Check it out if you're unable to resolve your issues !

Comment
Add comment · Show 6 · 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 siddharth3322 · Aug 09, 2014 at 03:31 AM 1
Share

Thanks for this nice explanation. I think in my case, there are multiple copies of class file exist among jar files. So how to track these problem as per your consideration?

One more thing I up vote your answer for clear explanation.

avatar image liortal · Aug 10, 2014 at 06:58 AM 0
Share

Is there any more information in the unity console? usually the DEX tool should tell you exactly what's causing the error. For example, see this: http://answers.unity3d.com/questions/672365/unable-to-convert-classes-into-dex-format.html

The error shown in the console is

stderr[ UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: a*lready added: Landroid/support/v4/hardware/display/Display$$anonymous$$anagerCompat;*

In your case it should also show what class was already added and is attempted to be re-added to the DEX.

avatar image siddharth3322 · Aug 13, 2014 at 11:32 AM 0
Share

Thanks for your help. Now I clearly understand problem that cause this type of error and successfully solved that one.

I modify jar file content and then used new one that conflict with other jar files.

avatar image GabeGabe · Jul 13, 2015 at 02:16 PM 0
Share

When I want to build I have the same error. (unable to convert classes into dex format) Here is the error: http://pastebin.com/kS7rESRe I can't figure out what's the problem...I deleted same .jar files. Anyone can help me?

avatar image liortal GabeGabe · Jul 15, 2016 at 04:38 PM 0
Share

The link doesn't work. do you have any duplicate libraries?

avatar image Binbag42 · Sep 12, 2017 at 07:57 PM 0
Share

Thanks it helped. I had an issue after upgrading Fabrics where for some reason it kept the old associated jar files (ie crashlytics, crashlytics-core, beta, fabric, answers) on top of the new ones. After a search in my project for the respective .jar files, I deleted the old versions.

avatar image
10

Answer by Butnaru · Apr 12, 2016 at 04:41 PM

I once had that problem with Google Play Game Services and Facebook SDK v7.4.0 there was 2 files support-v4-23.0.0 and support-v4-23.1.1 so i just remove the last one and it worked

Comment
Add comment · Show 4 · 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 dracobk201 · Jul 14, 2016 at 07:41 PM 0
Share

Thx bro, you (literally) saved my ass. Thx again.

avatar image liju · Jul 28, 2016 at 06:51 AM 0
Share

Thank you , it works

avatar image BranditDEV · Oct 13, 2016 at 04:02 PM 0
Share

Thank YOU very $$anonymous$$UCH!!! been looking for this 2 days!

avatar image andrew_2992 · Dec 08, 2016 at 08:25 AM 0
Share

Hey! I have the exact same problem, unfortunately I haven't been able to solve it yet as I can't delete my support-v4-23.4.0.aar file?!?! any suggestions? Every time I delete it and restart Unity it just appears again!

Thanks, -Andrew

avatar image
2

Answer by aliakbo · May 17, 2016 at 02:49 PM

We had Chartboost and Google Play services in our project and the issue for us was this line in the Chartboost android manifest that was duplicate in other manifests.

 <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

deleting it fixed our issue.

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 Raviraja190 · Apr 26, 2018 at 06:46 PM 0
Share

i have the same issue i cannot find this line in chartboost android manifest, but i had found in plugin/android/android manifest/under required by chartboost this line was there. then i deleted that line and builded it again same error alt text

error.jpg (232.1 kB)
avatar image
1

Answer by smallbit · Aug 07, 2014 at 10:36 AM

I once had that problem with Google Play Game Services and chartboost ads. The problem lies precisely where you think. The chartboost ads classes were in conflict with those from google play (same name classes for ads). Hence the ads were displayed only via chartboost, the solution was to remove them from the other jar (Google play games). I just changed google play games jar to zip, and opened it in total commander (jar is like zip, you can use any software), than i removed ads folder (could not recall the exact name), changed extension back to jar, and voila I could build without problems :)

Another similar problem on dex classes that I once had,was that I got new plugin that required the newest JDK, hence JDK update solve the issue. The best would be if you will copy full error message from console.

Comment
Add comment · Show 2 · 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 siddharth3322 · Aug 07, 2014 at 11:12 AM 0
Share

Full error message represented in following image alt text

Also I want to ask one more question that I read in some post. Whether I have to do anything with UnityPlayerNativeActivity? Any sub classing related stuff? or this is totally unrelated here.

errorbuildplayer.png (10.2 kB)
avatar image majak · Jan 28, 2015 at 06:41 PM 0
Share

in total commander you can use ctrl+pagedown to enter any compressed file without changing it to zip

avatar image
0

Answer by Bilgisoft · Sep 04, 2016 at 11:20 PM

Thanks Butnaru thats true. worked.

http://answers.unity3d.com/answers/1169518/view.html

Comment
Add comment · Show 2 · 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 KingKong320 · Jun 01, 2018 at 07:05 AM 0
Share

Please help if anyone knows about this issue

CommandInvokationFailure: Unable to convert classes into dex format. C:/Program Files/Java/jdk1.8.0_162\bin\java.exe -Xmx2048$$anonymous$$ -Dcom.android.sdkmanager.toolsdir="G:/android-sdks\tools" -Dfile.encoding=UTF8 -jar "C:\UNity 5.6.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[ Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat$1; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat$OnRequestPermissionsResultCallback; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/Activity$$anonymous$$anagerCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityOptionsCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/AppOps$$anonymous$$anagerCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/BundleUtil;

UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.RuntimeException: Translation has been interrupted at com.android.dx.command.dexer.$$anonymous$$ain.processAllFiles($$anonymous$$ain.java:615) at com.android.dx.command.dexer.$$anonymous$$ain.run$$anonymous$$onoDex($$anonymous$$ain.java:313) at com.android.dx.command.dexer.$$anonymous$$ain.runDx($$anonymous$$ain.java:291) at com.android.dx.command.dexer.$$anonymous$$ain.main($$anonymous$$ain.java:247) at com.android.dx.command.$$anonymous$$ain.main($$anonymous$$ain.java:94) at sun.reflect.Native$$anonymous$$ethodAccessorImpl.invoke0(Native $$anonymous$$ethod) at sun.reflect.Native$$anonymous$$ethodAccessorImpl.invoke(Native$$anonymous$$ethodAccessorImpl.java:62) at sun.reflect.Delegating$$anonymous$$ethodAccessorImpl.invoke(Delegating$$anonymous$$ethodAccessorImpl.java:43) at java.lang.reflect.$$anonymous$$ethod.invoke($$anonymous$$ethod.java:498) at SD$$anonymous$$$$anonymous$$ain.main(SD$$anonymous$$$$anonymous$$ain.java:130) Caused by: java.lang.InterruptedException: Too many errors at com.android.dx.command.dexer.$$anonymous$$ain.processAllFiles($$anonymous$$ain.java:607) ... 9 more ]

avatar image KingKong320 · Jun 01, 2018 at 07:10 AM 0
Share

i have imported chartboost sdk and its giving error of unable to convert classes into dex format,If anybody knows please help me 0out.Thanlkyou

CommandInvokationFailure: Unable to convert classes into dex format. C:/Program Files/Java/jdk1.8.0_162\bin\java.exe -Xmx2048$$anonymous$$ -Dcom.android.sdkmanager.toolsdir="G:/android-sdks\tools" -Dfile.encoding=UTF8 -jar "C:\UNity 5.6.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

stderr[ Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat$1; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat$OnRequestPermissionsResultCallback; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityCompat$SharedElementCallback21Impl; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/Activity$$anonymous$$anagerCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/ActivityOptionsCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/AppOps$$anonymous$$anagerCompat; Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/BundleUtil;

UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.RuntimeException: Translation has been interrupted at com.android.dx.command.dexer.$$anonymous$$ain.processAllFiles($$anonymous$$ain.java:615) at com.android.dx.command.dexer.$$anonymous$$ain.run$$anonymous$$onoDex($$anonymous$$ain.java:313) at com.android.dx.command.dexer.$$anonymous$$ain.runDx($$anonymous$$ain.java:291) at com.android.dx.command.dexer.$$anonymous$$ain.main($$anonymous$$ain.java:247) at com.android.dx.command.$$anonymous$$ain.main($$anonymous$$ain.java:94) at sun.reflect.Native$$anonymous$$ethodAccessorImpl.invoke0(Native $$anonymous$$ethod) at sun.reflect.Native$$anonymous$$ethodAccessorImpl.invoke(Native$$anonymous$$ethodAccessorImpl.java:62) at sun.reflect.Delegating$$anonymous$$ethodAccessorImpl.invoke(Delegating$$anonymous$$ethodAccessorImpl.java:43) at java.lang.reflect.$$anonymous$$ethod.invoke($$anonymous$$ethod.java:498) at SD$$anonymous$$$$anonymous$$ain.main(SD$$anonymous$$$$anonymous$$ain.java:130) Caused by: java.lang.InterruptedException: Too many errors at com.android.dx.command.dexer.$$anonymous$$ain.processAllFiles($$anonymous$$ain.java:607) ... 9 more ]

  • 1
  • 2
  • ›

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

41 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

Related Questions

DLL plugins unsupported for Android Application Building 0 Answers

Help Understanding the Use of Unity with Android 1 Answer

Call native android constructor 2 Answers

A node in a childnode? 1 Answer

Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. 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