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
0
Question by anywherenotes · Mar 12, 2015 at 08:02 AM · androidunity5

Since upgrading to 5.0: Unable to convert classes into dex format. See the Console for details.

Ever since upgrading to Unity 5, I haven't been able to build for android (I only build for android).

Below is the error I get. I use few plugins: google play, OpenIAB, facebook (I hope that's it, but I had recently removed Amazon - but did so after I got this error, and was hoping removing amazon game circle would help).

 CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
 /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/alex/development/adt-bundle-mac-x86_64-20131030/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/Unity.app/Contents/BuildTargetTools/AndroidPlayer/sdktools.jar" -
 
 stderr[
 
 UNEXPECTED TOP-LEVEL EXCEPTION:
 java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/kf$a;
     at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122)
     at com.android.dx.dex.file.DexFile.add(DexFile.java:161)
     at com.android.dx.command.dexer.Main.processClass(Main.java:732)
     at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673)
     at com.android.dx.command.dexer.Main.access$300(Main.java:82)
     at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602)
     at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
     at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
     at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:229)
     at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:158)
     at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
     at com.android.dx.command.dexer.Main.processOne(Main.java:632)
     at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510)
     at com.android.dx.command.dexer.Main.runMonoDex(Main.java:279)
     at com.android.dx.command.dexer.Main.run(Main.java:245)
     at com.android.dx.command.dexer.Main.main(Main.java:214)
     at com.android.dx.command.Main.main(Main.java:106)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:606)
     at SDKMain.main(SDKMain.java:129)
 1 error; aborting
 ]
 stdout[
 processing archive bin/classes.jar...
 processing com/unity3d/player/a$1.class...
 processing com/unity3d/player/a$2.class...
 processing com/unity3d/player/a$a.class...
 processing com/unity3d/player/a.class...
 processing com/unity3d/player/b$1.class...
 processing com/unity3d/player/b$2.class...
 processing com/unity3d/player/b.class...
 processing com/unity3d/player/c.class...
 processing com/unity3d/player/d$1.class...
 processing com/unity3d/player/d$2.class...
 processing com/unity3d/player/d.class...
 processing com/unity3d/player/e.class...
 processing com/unity3d/player/f.class...
 processing com/unity3d/player/g.class...
 processing com/unity3d/player/h.class...
 processing com/unity3d/player/i.class...
 processing com/unity3d/player/j$1.class...
 processing com/unity3d/player/j$2$1$1.class...
 processing com/unity3d/player/j$2$1.class...
 processing com/unity3d/player/j$2.class...
 processing com/unity3d/player/j.class...
 processing com/unity3d/player/k$1.class...
 processing com/unity3d/player/k.class...
 processing com/unity3d/player/l.class...
 processing com/unity3d/player/m.class...
 processing com/unity3d/player/n$1.class...
 processing com/unity3d/player/n.class...
 processing com/unity3d/player/NativeLoader.class...
 processing com/unity3d/player/o.class...
 processing com/unity3d/player/ReflectionHelper$1.class...
 processing com/unity3d/player/ReflectionHelper$a.class...
 processing com/unity3d/player/ReflectionHelper.class...
 processing com/unity3d/player/p.class...
 processing com/unity3d/player/q$1.class...
 processing com/unity3d/player/q$2.class...
 processing com/unity3d/player/q$3.class...
 processing com/unity3d/player/q.class...
 processing com/unity3d/player/r.class...
 processing com/unity3d/player/s.class...
 processing com/unity3d/player/UnityPlayer$1.class...
 processing com/unity3d/player/UnityPlayer$2.class...
 processing com/unity3d/player/UnityPlayer$3.class...
 processing com/unity3d/player/UnityPlayer$4.class...
 processing com/unity3d/player/UnityPlayer$5.class...
 processing com/unity3d/player/UnityPlayer$6.class...
 processing com/unity3d/player/UnityPlayer$7.class...
 processing com/unity3d/player/UnityPlayer$8.class...
 processing com/unity3d/player/UnityPlayer$9.class...
 processing com/unity3d/player/UnityPlayer$10.class...
 processing com/unity3d/player/UnityPlayer$11$1.class...
 processing com/unity3d/player/UnityPlayer$11.class...
 processing com/unity3d/player/UnityPlayer$12.class...
 processing com/unity3d/player/UnityPlayer$13.class...
 processing com/unity3d/player/UnityPlayer$14.class...
 processing com/unity3d/player/UnityPlayer$15.class...
 processing com/unity3d/player/UnityPlayer$16.class...
 processing com/unity3d/player/UnityPlayer$17.class...
 processing com/unity3d/player/UnityPlayer$a.class...
 processing com/unity3d/player/UnityPlayer$b.class...
 processing com/unity3d/player/UnityPlayer$c.class...
 processing com/unity3d/player/UnityPlayer.class...
 processing com/unity3d/player/UnityPlayerActivity.class...
 processing com/unity3d/player/UnityPlayerNativeActivity.class...
 processing com/unity3d/player/UnityPlayerProxyActivity.class...
 processing com/unity3d/player/t.class...
 processing com/unity3d/player/u$1.class...
 processing com/unity3d/player/u.class...
 processing com/unity3d/player/WWW.class...
 processing org/fmod/FMODAudioDevice$a.class...
 processing org/fmod/FMODAudioDevice.class...
 processing org/fmod/a.class...
 processing bin/classes/./com/facebook/android/R$attr.class...
 processing bin/classes/./com/facebook/android/R$color.class...
 processing bin/classes/./com/facebook/android/R$dimen.class...
 processing bin/classes/./com/facebook/android/R$drawable.class...
 processing bin/classes/./com/facebook/android/R$id.class...
 processing bin/classes/./com/facebook/android/R$integer.class...
 processing bin/classes/./com/facebook/android/R$layout.class...
 processing bin/classes/./com/facebook/android/R$raw.class...
 processing bin/classes/./com/facebook/android/R$string.class...
 processing bin/classes/./com/facebook/android/R$style.class...
 processing bin/classes/./com/facebook/android/R$styleable.class...
 processing bin/classes/./com/facebook/android/R.class...
 processing bin/classes/./com/google/android/gms/R$attr.class...
 processing bin/classes/./com/google/android/gms/R$color.class...
 processing bin/classes/./com/google/android/gms/R$dimen.class...
 processing bin/classes/./com/google/android/gms/R$drawable.class...
 processing bin/classes/./com/google/android/gms/R$id.class...
 processing bin/classes/./com/google/android/gms/R$integer.class...
 processing bin/classes/./com/google/android/gms/R$layout.class...
 processing bin/classes/./com/google/android/gms/R$raw.class...
 processing bin/classes/./com/google/android/gms/R$string.class...
 processing bin/classes/./com/google/android/gms/R$style.class...
 processing bin/classes/./com/google/android/gms/R$styleable.class...
 processing bin/classes/./com/google/android/gms/R.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$attr.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$color.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$dimen.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$drawable.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$id.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$integer.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$layout.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$raw.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$string.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$style.class...
 processing bin/classes/./com/google/example/games/basegameutils/R$styleable.class...
 processing bin/classes/./com/google/example/games/basegameutils/R.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$attr.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$color.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$dimen.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$drawable.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$id.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$integer.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$layout.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$raw.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$string.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$style.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R$styleable.class...
 processing bin/classes/./com/google/example/games/mainlibproj/R.class...
 processing bin/classes/./com/mildspring/maze/R$attr.class...
 processing bin/classes/./com/mildspring/maze/R$color.class...
 processing bin/classes/./com/mildspring/maze/R$dimen.class...
 processing bin/classes/./com/mildspring/maze/R$drawable.class...
 processing bin/classes/./com/mildspring/maze/R$id.class...
 processing bin/classes/./com/mildspring/maze/R$integer.class...
 processing bin/classes/./com/mildspring/maze/R$layout.class...
 processing bin/classes/./com/mildspring/maze/R$raw.class...
 processing bin/classes/./com/mildspring/maze/R$string.class...
 processing bin/classes/./com/mildspring/maze/R$style.class...
 processing bin/classes/./com/mildspring/maze/R$styleable.class...
 processing bin/classes/./com/mildspring/maze/R.class...
 processing archive plugins/./android-support-v4.jar...
 ignored resource META-INF/MANIFEST.MF
 processing android/support/annotation/ArrayRes.class...
 processing android/support/annotation/StyleableRes.class...
 processing android/support/annotation/RawRes.class...
 processing android/support/annotation/InterpolatorRes.class...
 processing android/support/annotation/PluralsRes.class...
 processing android/support/annotation/DrawableRes.class...
 processing android/support/annotation/ColorRes.class...
 processing android/support/annotation/IntDef.class...
 processing android/support/annotation/BoolRes.class...
 processing android/support/annotation/XmlRes.class...
 processing android/support/annotation/LayoutRes.class...
 processing android/support/annotation/IdRes.class...
 processing android/support/annotation/AttrRes.class...
 processing android/support/annotation/AnimatorRes.class...
 processing android/support/annotation/StringRes.class...
 processing android/support/annotation/NonNull.class...
 processing android/support/annotation/DimenRes.class...
 processing android/support/annotation/Nullable.class...
 processing android/support/annotation/MenuRes.class...
 processing android/support/annotation/StringDef.class...
 processing android/support/annotation/AnyRes.class...
 processing android/support/annotation/FractionRes.class...
 processing android/support/annotation/StyleRes.class...
 processing android/support/annotation/IntegerRes.class...
 processing android/support/annotation/AnimRes.class...
 processing android/support/v4/app/RemoteInput$ImplApi20.class...
 processing android/support/v4/app/Fragment$InstantiationException.class...
 processing android/support/v4/app/RemoteInput.class...
 processing android/support/v4/app/Fragment.class...
 processing android/support/v4/app/FragmentTransitionCompat21$2.class...
 processing android/support/v4/app/LoaderManager$LoaderCallbacks.class...
 processing android/support/v4/app/FragmentManager$OnBackStackChangedListener.class...
 processing android/support/v4/app/NotificationCompatApi20$Builder.class...
 processing android/support/v4/app/FragmentTransitionCompat21$ViewRetriever.class...
 processing android/support/v4/app/NotificationCompatIceCreamSandwich.class...
 processing android/support/v4/app/TaskStackBuilderHoneycomb.class...
 processing android/support/v4/app/NoSaveStateFrameLayout.class...
 processing android/support/v4/app/NotificationCompat$CarExtender$UnreadConversation$1.class...
 processing android/support/v4/app/RemoteInput$ImplJellybean.class...
 processing android/support/v4/app/NavUtils$NavUtilsImplBase.class...
 processing android/support/v4/app/NotificationCompat.class...
 processing android/support/v4/app/RemoteInputCompatJellybean.class...
 processing android/support/v4/app/FragmentManagerState.class...
 processing android/support/v4/app/BackStackState.class...
 processing android/support/v4/app/NotificationCompatApi21.class...
 processing android/support/v4/app/NotificationCompat$WearableExtender.class...
 processing android/support/v4/app/ListFragment$2.class...
 processing android/support/v4/app/ShareCompatICS.class...
 processing android/support/v4/app/LoaderManager.class...
 processing android/support/v4/app/FragmentTransaction.class...
 processing android/support/v4/app/NotificationCompat$NotificationCompatImplJellybean.class...
 processing android/support/v4/app/RemoteInput$ImplBase.class...
 processing android/support/v4/app/ActionBarDrawerToggle$SlideDrawable.class...
 processing android/support/v4/app/NotificationManagerCompat$NotifyTask.class...
 processing android/support/v4/app/BackStackRecord$1.class...
 processing android/support/v4/app/NotificationManagerCompat$SideChannelManager.class...
 processing android/support/v4/app/ActivityOptionsCompat21.class...
 processing android/support/v4/app/RemoteInput$1.class...
 processing android/support/v4/app/ActionBarDrawerToggleHoneycomb$SetIndicatorInfo.class...
 processing android/support/v4/app/INotificationSideChannel$Stub.class...
 processing android/support/v4/app/NotificationCompatApi21$Builder.class...
 processing android/support/v4/app/TaskStackBuilder$TaskStackBuilderImpl.class...
 processing android/support/v4/app/TaskStackBuilder$TaskStackBuilderImplBase.class...
 processing android/support/v4/app/NavUtils.class...
 processing android/support/v4/app/NotificationManagerCompatIceCreamSandwich.class...
 processing android/support/v4/app/TaskStackBuilder$TaskStackBuilderImplJellybean.class...
 processing android/support/v4/app/NotificationManagerCompat.class...
 processing android/support/v4/app/ShareCompat$IntentBuilder.class...
 processing android/support/v4/app/NotificationCompatBase$Action.class...
 processing android/support/v4/app/RemoteInputCompatApi20.class...
 processing android/support/v4/app/FragmentTransaction$Transit.class...
 processing android/support/v4/app/BackStackRecord$2.class...
 processing android/support/v4/app/NotificationCompatKitKat$Builder.class...
 processing android/support/v4/app/NotificationManagerCompatEclair.class...
 processing android/support/v4/app/SharedElementCallback.class...
 processing android/support/v4/app/NotificationCompatJellybean$Builder.class...
 processing android/support/v4/app/BundleUtil.class...
 processing android/support/v4/app/FragmentContainer.class...
 processing android/support/v4/app/NotificationBuilderWithActions.class...
 processing android/support/v4/app/FragmentManagerImpl$2.class...
 processing android/support/v4/app/NotificationCompatSideChannelService.class...
 processing android/support/v4/app/NotificationManagerCompat$SideChannelManager$ListenerRecord.class...
 processing android/support/v4/app/FragmentState.class...
 processing android/support/v4/app/ActionBarDrawerToggle$ActionBarDrawerToggleImpl.class...
 processing android/support/v4/app/NotificationCompatApi20.class...
 processing android/support/v4/app/NavUtils$NavUtilsImpl.class...
 processing android/support/v4/app/NotificationCompat$Builder.class...
 processing android/support/v4/app/DialogFragment$DialogStyle.class...
 processing android/support/v4/app/Fragment$SavedState$1.class...
 processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImplJB.class...
 processing android/support/v4/app/ActivityOptionsCompat$ActivityOptionsImpl21.class...
 processing android/support/v4/app/ActionBarDrawerToggle.class...
 processing android/support/v4/app/NotificationCompat$NotificationCompatImplHoneycomb.class...
 processing android/support/v4/app/NotificationManagerCompat$Impl.class...
 processing android/support/v4/app/NotificationCompat$Action$Extender.class...
 processing android/support/v4/app/ShareCompatJB.class...
 processing android/support/v4/app/NavU

Comment
Add comment · Show 1
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 Yury-Habets ♦♦ · Mar 13, 2015 at 06:48 AM 0
Share

This is the actual error:

java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/kf$a;

Assu$$anonymous$$g that you didn't add anything new (an .aar file?), I'd recommend just reimporting all plugins.

1 Reply

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

Answer by anywherenotes · Mar 13, 2015 at 10:53 AM

Found the problem - google play services library existed twice, not sure how it happened. Here's a command I ran, in case someone else will need it:

 Aleksandrs-MBP:maze alex$ find . -name "*.jar" | sed -e "s:\(.*\)/\([^/]*\)$:\2 \1:" | sort
 
 OpenIAB-plugin.jar ./Maze/Assets/Plugins/Android
 
 android-support-v4.jar ./Maze/Assets/Facebook/Editor/android/android-libs
 
 android-support-v4.jar ./Maze/Assets/Plugins/Android
 
 base-game-utils.jar ./Maze/Assets/Plugins/Android/BaseGameUtils/libs
 
 classes.jar ./Maze/Assets/Plugins/Android/facebook/bin
 
 google-play-services.jar ./Maze/Assets/Plugins/Android/google-play-services_lib/libs
 
 google-play-services.jar ./Maze/Assets/Plugins/google-play-services_lib/libs
 
 play-games-plugin-support.jar ./Maze/Assets/Plugins/Android/MainLibProj/libs
 
 unity-classes.jar ./Maze/Assets/Facebook/Editor/android/android-libs
 
 unity-plugin-library.jar ./Maze/Assets/Plugins/Android
 
 Aleksandrs-MBP:maze alex$ pwd
 
 /Users/alex/documents/development/unity/maze

I have removed the duplicate by running

 rm -rf ./Maze/Assets/Plugins/google-play-services_lib
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 fazlarabby · Jul 11, 2016 at 08:26 AM 0
Share

how did you ran this? Can you please let me know in details?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to access the mobile phone gallery (android) ? 2 Answers

[5.4 - Unity2D - Android] UI Button Requires Child Text? 0 Answers

How to launch built-in/first party applications using c# in Unity project (for both Android and iOS)? 0 Answers

Unity3d is not good for product based app like snapchat? 1 Answer

buttons not working in android. 1 Answer


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