• Register
1 vote

Problem :

I am very new to google play games services and Admob plugin. Currently I am trying to build the APK using google play games services and Admob plugin but it is not working for me. I am facing below error.

CommandInvokationFailure: Unable to convert classes into dex format.
C:/Program Files/Java/jdk1.8.0_121\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -

Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbyb;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzbyc;
2 errors; aborting

Please Note: I am using Unity 5.6.1f1 (64-bit)

Please help me in fixing above error.

8 5 2
3,230 points

2 Answers

1 vote

Solution :

I had recently helped couple of people to fix above error.

The error starts appearing if you have any duplicate plugins in the project;

Please find below listed scenarios for your help:

If you have included the same plugin more than once under different folders of your project.

If you have included the same plugin more than once with different versions.

If your plugin contains some other dependencies embedded inside it and they are already included in your project in other form.

To fix this issue you should look up for any duplicate Android plugins in the project and try to eliminate the duplicates by keeping only one copy. From your error message which you have posted I can surely say that the issue here is related to your Google play services libraries. So you should try to look into the libraries which are named play-services-xxxx.aar.

8 4
5,680 points
0 votes

When the unity builds your project for Andriod, then it has to invoke several tools from the Andriod SDK. It converts all of your native code for Andriod into a file format called DEX.

All of Andriod plugins are built on a single package using that tool. The problem starts a few plugins have the same compiled java code in them. This will cause the DEX tool to fail within an error.

This means that the classes with those names were already included in another library. So, they cannot be added again.

Possible Causes:

This error occurs when you have duplicate plugins in your project. This can happen in different scenarios.


Here are some examples;

  • The same plugin is included more than once, under different folders of the project.
  • The same plugin can be included more than once with different versions.
  • A plugin contains other dependencies “embedded” inside it. But these dependencies are already included in the project in some form.


You should have to look at duplicate plugins in your project and eliminate them. From the error message you posted, the issue is related to Google Play services libraries. You should look into that library named play-services-xxxx-aar.

11 5 1
3,890 points

Related questions

0 votes
2 answers 507 views
Problem : I want to upload the finished android app to a android market but I am getting below error: “You need to use a different package name because "com.example" is restricted.”
asked Jan 22 jwilliam 3.9k points
0 votes
1 answer 6 views
0 votes
1 answer 17 views
Problem: I am trying to understand UNITY C#. I am facing the below error A field initializer cannot reference the nonstatic field unity. If tried to get the list from another script. Please find below my code. //Excerpt from a script where I get a component ... list in the other script  (TM) public List<GameObject> TilesL = new List<GameObject>(); Kindly help me in fixing above unity error.
asked Jul 20 Raphael Pacheco 4.9k points
1 vote
2 answers 46 views
Problem: I am beginner to C# with Unity engine. I have already started learning C# with Unity engine. I have tried to write the very basic script as shown below for your reference: using UnityEngine; using System.Collections; public class scriptMyBall : MonoBehaviour { / ... but unable to fix the Unity Engine related error. I need Unity Engine&rsquo;s expert who can guide me in fixing above error.
asked May 23 Martin K 6.6k points
0 votes
1 answer 285 views
Problem : I am trying to create the test app using unity but facing following issue: readpixels was called to read pixels from system frame buffer, while not inside drawing frame.
asked Nov 14, 2019 peterlaw 6.9k points