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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
1
Question by achillesdotexe · May 21, 2015 at 07:44 PM · admob

Unable to convert classes into dex format

Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/prakash/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/Unity4.6.2p2.app/Contents/BuildTargetTools/AndroidPlayer/sdktools.jar" -

stderr[

UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lcom/google/ads/AdSize; 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 ] 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.class... processing com/unity3d/player/c$1.class... processing com/unity3d/player/c$2.class... processing com/unity3d/player/c.class... processing com/unity3d/player/d.class... processing com/unity3d/player/e$1.class... processing com/unity3d/player/e$2.class...

---------goes on and on.....

We are using unity4.6.2p2, google admob from this http://forum.unity3d.com/threads/free-admob-plugin-simple-prefab.167731/page-2", targeting for android.

Thanks in advance!

Comment
Add comment · Show 2
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 Hagen · Aug 13, 2015 at 09:44 PM 0
Share

were you using any other plug in? or this happened to you just after adding Ad$$anonymous$$ob?

avatar image achillesdotexe · Aug 14, 2015 at 06:25 AM 0
Share

We were using multiple plugins for ads, such as unity ads for video ads, admob for banner ad, game promotion network.

But issue was with duplicate copies of ads folder inside the file "google-play-services.jar". And to be honest we were not sure, That ad folder was related to admob or unityads. So we removed the ads folder, which was there outside the google folder, left the ads folder which is already available inside google folder structure. alt text

screen-shot-2015-08-14-at-114812-am.png (73.7 kB)

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by achillesdotexe · May 22, 2015 at 12:08 PM

I figured out how to fix this. We need to remove "ads" references from the jar file[used JD_GUI tool] in this path "plugins/android/google-play-services_lib/lib/google-play-services.jar". Because its was conflicting with admob. Everything is working fine now.

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 Hagen · Aug 17, 2015 at 06:47 PM 0
Share

thanks, I had to remove external plugins but your post has helped me to accelerate the debug process.

avatar image
0

Answer by avi9111 · Feb 27, 2016 at 03:59 PM

I had the same situation, thanks , though I did not have to use js_gui, I encode jar with the command "java -cvf xxxx.jar cn\" instead of "xxx.jar ", remember not to use to package multiple R in jar, then i work find in u3d android package

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

AdMob + Unity + Emulator = No Ad? (Is it supposed to be like this?) 0 Answers

How do Smart Banners scale? 0 Answers

Admob banner ads not showing 0 Answers

Admob not working 1 Answer

too many languages in apk 0 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