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 Lylek · Jul 01, 2014 at 01:26 AM · androiderrorpluginclasseswin32exception

Error building Player: Win32Exception - with plugin?

I installed this plugin to use Google Play Services with unity, and now I'm getting this error:

Error building Player: Win32Exception: ApplicationName='C:\Program Files\Java\jre8\bin\javac.exe'

My JAVA_HOME variable is set to the jre. If I set it to the jdk, I get an "unable to convert classes to dex format" error instead:

Error building Player: CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. C:\Program Files\Java\jdk1.8.0_05\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android/adt-bundle-windows-x86_64-20131030/adt-bundle-windows-x86_64-20131030/sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -

If I remove the plugin, the error goes away. Anyone who uses this plugin know what the problem is?

Plugin: https://github.com/playgameservices/play-games-plugin-for-unity/tree/master/current-build

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 Lylek · Jul 01, 2014 at 03:12 AM 0
Share

Ah, I also have an Admob plugin, and I think they're interfering with each other. I switched JAVA_HO$$anonymous$$E back to the jdk, and unstalled the admob plugin (just had the GPS plugin), and it worked...

1 Reply

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

Answer by liortal · Jul 02, 2014 at 09:39 PM

When encountering DEX errors, Unity will display the entire error message to the console. It can be helpful to see the entire error.

Usually from what i've seen, these are caused by attempting to include compiled classes multiple times in the build process.

For example, in case you're including the Google Play Services library (jar) directly yourself, and the plugin you use also has its own copy for it.

Regarding the first error (when using JRE) - not sure whether Java 8 is supported or if it's because you are using the x64 version of it (also could be a totally different reason...)

Comment
Add comment · Show 7 · 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 Lylek · Jul 03, 2014 at 02:55 AM 0
Share

Thank you for your response.

So, using the JAVA_HO$$anonymous$$E set to the jdk, I was able to build with the Admob plugin, alone, with no errors. I was also able to build with just the GPS plugin. When combining the two I got that dex format error...

I searched my Android SD$$anonymous$$ $$anonymous$$anger files and found that GPS Library.jar file, as well as one included in my Unity Project within my plugins folder! So I deleted the one in my project and was able to build. But, Google Play Services no longer worked on my app. So I tried deleting the one from my SD$$anonymous$$ files, and just got the dex format error again...?

avatar image liortal · Jul 03, 2014 at 07:03 AM 0
Share

This occurs during Unity build right? please attach the full console output to your question. Also, it would assist if you briefly described the structure of your project (e.g: which libraries are used and where they are placed).

avatar image Lylek · Jul 03, 2014 at 08:46 AM 0
Share

Yes, I get the error on build.

 UNEXPECTED TOP-LEVEL EXCEPTION:
 java.lang.IllegalArgumentException: already added: Lcom/google/ads/AdRequest$Gender;
     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.$$anonymous$$ain.processClass($$anonymous$$ain.java:685)
     at com.android.dx.command.dexer.$$anonymous$$ain.processFileBytes($$anonymous$$ain.java:634)
     at com.android.dx.command.dexer.$$anonymous$$ain.access$600($$anonymous$$ain.java:78)
     at com.android.dx.command.dexer.$$anonymous$$ain$1.processFileBytes($$anonymous$$ain.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.$$anonymous$$ain.processOne($$anonymous$$ain.java:596)
     at com.android.dx.command.dexer.$$anonymous$$ain.processAllFiles($$anonymous$$ain.java:498)
     at com.android.dx.command.dexer.$$anonymous$$ain.run$$anonymous$$onoDex($$anonymous$$ain.java:264)
     at com.android.dx.command.dexer.$$anonymous$$ain.run($$anonymous$$ain.java:230)
     at com.android.dx.command.dexer.$$anonymous$$ain.main($$anonymous$$ain.java:199)
     at com.android.dx.command.$$anonymous$$ain.main($$anonymous$$ain.java:103)
     at sun.reflect.Native$$anonymous$$ethodAccessorImpl.invoke0(Native $$anonymous$$ethod)
     at sun.reflect.Native$$anonymous$$ethodAccessorImpl.invoke(Native$$anonymous$$ethodAccessorImpl.java:62)
     at sun.reflect.Delegating$$anonymous$$ethodAccessorImpl.invoke(Delegating$$anonymous$$ethodAccessorImpl.java:43)
     at java.lang.reflect.$$anonymous$$ethod.invoke($$anonymous$$ethod.java:483)
     at SD$$anonymous$$$$anonymous$$ain.main(SD$$anonymous$$$$anonymous$$ain.java:129)
 1 error; aborting

avatar image Lylek · Jul 03, 2014 at 08:47 AM 0
Share

Project Structure: >Assets >Ad$$anonymous$$obPlugin >Scripts >Editor >GooglePlayGames >BasicApi >$$anonymous$$ultiplayer >RealTime$$anonymous$$ultiplayer >ISocialPlatform >OurUtils >Platforms >Android >IOS >RealTime$$anonymous$$ultiplayer >Plugins >Android >admob-plugin.jar >GoogleAd$$anonymous$$obAdsSdk-6.4.1 >BaseGameUtils >libs >base-game-utils.jar >res >google-play-services_lib >libs >google-play-services.jar >google-play-services.jar.properties >res >source >$$anonymous$$ainLibProj >libs >play-games-plugin-support.jar >IOS

Updated. Sry, I missed the Admob plugin.

avatar image liortal · Jul 03, 2014 at 10:17 PM 0
Share

Is that all? you mention the Ad$$anonymous$$ob plugin, where is that under this hierarchy?

the class it complains about seems to originate from Ad$$anonymous$$ob (http://stuff.mit.edu:8001/afs/sipb/project/android/OldFiles/sdk/android-sdk-linux/extras/google/admob_ads_sdk/docs/com/google/ads/AdRequest.Gender.html)

Looks like you are including the Ad$$anonymous$$ob library twice somehow into the final AP$$anonymous$$ output...

Show more comments

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

22 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 avatar image avatar image

Related Questions

Problem in android plugin creation.? 0 Answers

Please help!!!!!! Win32 Exception 1 Answer

Soomla Error for android 1 Answer

Error Building Player: 'aapt.exe' Win32Exception 3 Answers

Error building Player: Win32Exception: ApplicationName=' \tools\android.bat', CommandLine='list targets', CurrentDirectory='' UnityEditor.HostView:OnGUI() 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