46837

Unity 5.1.1 android “merged manifest” or “classes into dex format” error

Question:

I tried this versions on my unity 5.1.1 (6.2.2, 7.0.1, 7.0.2) and I get errors in all when I build that in android.

Any idea?

In the 'stable version 6.2.2 I get "unable to convert files into dex format"

errors:

1. CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.

<blockquote>

C:\Program Files\Java\jdk1.7.0_17\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" - stderr[ UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/TimeUtils; ets..

</blockquote>

2. Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.

<blockquote>

C:\Program Files\Java\jdk1.7.0_17\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" - stderr[ UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Landroid/support/v4/util/TimeUtils; at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:122) at com.android.dx.dex.file.DexFile.add(DexFile.java:161) at

</blockquote>

ets..

In the 7.0.2 I get <strong>"can't merge manifest files"</strong>

Answer1:

This is most likely a result of having duplicate .jar files in your project. Try searching where your TimeUtils is, and making sure there are no similar .jar files in your Assets/Plugins/Android folder -- make sure to check deeper into folders within the Android folder. Note that it might not be an exact duplicate title (a different version number might also cause the problem).

I had this same issue with the push notifications plugin on my app (I had 2 so I removed one).

Recommend

  • Execute sh file from Java
  • Gracenote Error: Invalid User
  • List installed sdk package via command line
  • Any benefits of using Windows Communication Foundation/ Web Services vs. a simple .aspx page for sim
  • Unable to convert classes into dex format Unity
  • JSoup extract table as CSV from finance website
  • Call a java function from matlab script
  • Create an Android Virtual Device From a Java application Programmatically
  • Glassfish 5 will not start after enable-secure-admin command
  • IntelliJ IDEA 15 Scene Builder not showing all controls
  • cant connect to kafka from external machine
  • Incompatible wildcard types that should be compatible [duplicate]
  • Can Adobe AIR applications achieve SSO authentication against Active Directory?
  • JVM minimum heap size recommendation reasons?
  • CXF JAVA message Truncated
  • “undefined symbol: SQLAllocEnv” error in Java [duplicate]
  • Find the associated program to open a file using Java
  • Upgrade to g++ 4.7 (with c++11 support): any ABI incompatibility?
  • subprocess.Popen('start') fails
  • Can I monitor the progress of an S3 download using the AWS SDK?
  • C# COM Component Fails To Read Config When Loaded Into An Unmanaged C++ App
  • How do I compile a C/C++ program through windows command prompt?
  • Visual studio alerts workspace already exists
  • How to create a custom Powershell operator?
  • Find VMID for running instance
  • include dlls in visual studio c++ 2008
  • NSIS decompiler
  • netsh acl setting (need alternative method - registry settings?)
  • aapt.exe'' finished with non-zero exit value 1
  • Tamper-proof configuration files in .NET?
  • Code in Job's Script Block after Start-Process Does not Execute
  • x64 applications using gdi+: what are the consequences on performance?
  • Cannot resolve symbol 'MyApi'
  • If I include Java 8 in my Android app does that affect which devices it will work on?
  • Running a C# exe file
  • Release, debug version and Authorization Google?
  • How to format a variable of double type
  • Benchmarking RAM performance - UWP and C#
  • coudnt use logback because of log4j
  • JaxB to read class hierarchy