admob sdktools.jar problems

632 views
Skip to first unread message

Egor Kislovskiy

unread,
Nov 20, 2014, 11:03:30 PM11/20/14
to google-adm...@googlegroups.com
Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
java -Xmx1024M -Dcom.android.sdkmanager.toolsdir="/Users/Egor/Documents/Program Files/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/unity/ads/Banner$1$1;
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:685)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:634)
at com.android.dx.command.dexer.Main.access$600(Main.java:78)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:572)
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:596)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:498)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:264)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)
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:483)
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.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...
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.class...
processing com/unity3d/player/k$1.class...
processing com/unity3d/player/k.class...
processing com/unity3d/player/NativeLoader.class...
processing com/unity3d/player/l.class...
processing com/unity3d/player/PsmMainActivity.class...
processing com/unity3d/player/PsmUnityActivity.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/m.class...
processing com/unity3d/player/n$1.class...
processing com/unity3d/player/n$2.class...
processing com/unity3d/player/n$3.class...
processing com/unity3d/player/n.class...
processing com/unity3d/player/o.class...
processing com/unity3d/player/p.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.class...
processing com/unity3d/player/UnityPlayer$12$1.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$18.class...
processing com/unity3d/player/UnityPlayer$a.class...
processing com/unity3d/player/UnityPlayer$b.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/q.class...
processing com/unity3d/player/r$1.class...
processing com/unity3d/player/r.class...
processing com/unity3d/player/WWW.class...
processing org/fmod/FMODAudioDevice$a.class...
processing org/fmod/FMODAudioDevice.class...
processing org/fmod/a.class...
processing archive plugins/./adactivity.jar...
ignored resource META-INF/MANIFEST.MF
processing com/google/unity/ads/Banner$1$1.class...
processing com/google/unity/ads/Banner$1.class...
processing com/google/unity/ads/Banner$2.class...
processing com/google/unity/ads/Banner$3.class...
processing com/google/unity/ads/Banner$4.class...
processing com/google/unity/ads/Banner$5.class...
processing com/google/unity/ads/Banner.class...
processing com/google/unity/ads/Interstitial$1$1.class...
processing com/google/unity/ads/Interstitial$1.class...
processing com/google/unity/ads/Interstitial$2.class...
processing com/google/unity/ads/Interstitial$3.class...
processing com/google/unity/ads/Interstitial.class...
processing com/google/unity/ads/PluginUtils.class...
processing com/google/unity/ads/UnityAdListener.class...
processing archive plugins/./unity-plugin-library.jar...
ignored resource META-INF/MANIFEST.MF
processing com/google/unity/ads/Banner$1$1.class...
]

please help me resolve that problem ;с 

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Nov 21, 2014, 6:58:10 PM11/21/14
to google-adm...@googlegroups.com
Exceptions like the one you're getting ("already added: Lcom/google/unity/ads/Banner$1$1;") often come up when both the compiled jar file for the sdk and the source have been included in the same project.  Unity includes one, and then tries to include the other, which causes it to have two classes with identical names and packages.  At that point, it throws the "already added" exception.

I would recommend taking a look at your project includes and checking that you're not including both the source files and the already compiled jar file.  We recommend you just use the jar.

-Andrew

Richard Fu

unread,
Jan 27, 2015, 9:33:47 PM1/27/15
to google-adm...@googlegroups.com
I got the same problem, has the author fixed it and spotted what files has been duplicated?

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Jan 28, 2015, 1:11:04 PM1/28/15
to google-adm...@googlegroups.com
As I mentioned, the error is usually that both compiled library and its source code have been included in the project.  Have a look through your project's source for anything with the class names seen in the error report.  Then check your included external libraries.  If you see the same class in both locations, you know you've found the problem and can remove the source file.

-Andrew

Richard Fu

unread,
Jan 29, 2015, 12:10:01 AM1/29/15
to google-adm...@googlegroups.com
So, no hint which file it should be for "com/google/unity/ads/Banner"?

If I do a project file search for "Banner", will it helps? Or, it seems duplicate came from "ClassDefsSection.java", may be I should delete this file?
--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/IEdCIY2-aKg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Jan 30, 2015, 7:45:55 PM1/30/15
to google-adm...@googlegroups.com
Try searching through your code for a file called Banner.java.  If you not only included the mobile ads unity plugin, but also the code from our Github repo (https://github.com/googleads/googleads-mobile-plugins), you could end up with multiple copies of that class.

-Andrew
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages