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 shay4545 · May 14, 2015 at 09:22 PM · androidbuild-erroradsadmob

Build error android with 2 ad networks

When adding a second ad network into the project and trying to build, I get an error. Does anyone know how to fix it? This is the error:

 Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
 C:\Program Files\Java\jdk1.8.0_40\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android SDK/adt-bundle-windows-x86_64-20140702/sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Users/Shay/Documents/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
 
 stderr[
 
 UNEXPECTED TOP-LEVEL EXCEPTION:
 java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/qn;
     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:83)
     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:280)
     at com.android.dx.command.dexer.Main.run(Main.java:246)
     at com.android.dx.command.dexer.Main.main(Main.java:215)
     at com.android.dx.command.Main.main(Main.java:106)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:497)
     at SDKMain.main(SDKMain.java:130)
 1 error; aborting
 ]
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 shay4545 · May 15, 2015 at 01:20 AM 0
Share

boop boop

1 Reply

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

Answer by Yury-Habets · May 15, 2015 at 06:34 AM

The error sounds pretty clear:

java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/qn;

You likely have two instances of Play Services added.

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

20 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

Related Questions

Unrecognized Attribute name MODULE when building .AAB with AdMob 2 Answers

Admob Interstitial loading causes game to crash?? 0 Answers

Is it allowed to use Admob on Android TV and Apple TV? On internet there are many confusing answers 0 Answers

Admob Memory Issues 0 Answers

Can't build game after admob 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