• 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 Villarruel · Jun 09, 2018 at 08:40 AM · androiderror

Unable to build android APK unity 2018.1.1f1

HI

I'm a newbie but tried all the fixes I could find. 1. I downloaded older SDK(tools_r25.5_windows.zip) 2. I tested with java 10.1, 9.1 and now jdk1.8.0_171 3. I added JAVA_HOME and added bin path to PATH environment variables 4. I double checked path's and restarted unity a few times

After installed jdk 8 the error message changed but still doesnt work: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. C:/Users/User/AppData/Local/Android/Sdk\tools\bin\avdmanager.bat list target -c

stderr[ Exception in thread "main" java.lang.NoSuchMethodError: com.android.prefs.AndroidLocation.getAvdFolder()Ljava/lang/String; at com.android.sdklib.tool.AvdManagerCli.init(AvdManagerCli.java:278) at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:210) at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200) ] stdout[

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 m0guz · Jun 09, 2018 at 09:13 AM 0
Share

You can use latest SD$$anonymous$$ Tools with Unity 2018. No need to downgrade. To test your SD$$anonymous$$ paths; Open cmd window and enter C:/Users/User/AppData/Local/Android/Sdk\tools\bin\avdmanager.bat list target -c to see if everything works.

avatar image Villarruel m0guz · Jun 09, 2018 at 03:29 PM 0
Share

Hi Avietry

Get the same issue from C$$anonymous$$D. I'm back on the latest JD$$anonymous$$ and SD$$anonymous$$ and there's more details. I even formatted my computer and reinstalled all the software:

C:\Users\dylan\AppData\Local\Android\sdk\tools\bin\avdmanager.bat list target -c Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.Schema$$anonymous$$odule$Schema$$anonymous$$oduleVersion.(Schema$$anonymous$$odule.java:156) at com.android.repository.api.Schema$$anonymous$$odule.(Schema$$anonymous$$odule.java:75) at com.android.sdklib.repository.AndroidSdkHandler.(AndroidSdkHandler.java:81) at com.android.sdklib.tool.Avd$$anonymous$$anagerCli.run(Avd$$anonymous$$anagerCli.java:213) at com.android.sdklib.tool.Avd$$anonymous$$anagerCli.main(Avd$$anonymous$$anagerCli.java:200) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass($$anonymous$$ Source) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass($$anonymous$$ Source) at java.base/java.lang.ClassLoader.loadClass($$anonymous$$ Source) ... 5 more

2 Replies

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

Answer by Villarruel · Jun 10, 2018 at 07:37 PM

Hi

Already tried sdk v25.2.3 it didn't work. I redownloaded all my software. Installed unity 2018.1.1f1 with sdk 27.0.0 and Java 10.1. Still didn't work. Downgraded to Java 8 update 171 and it still didn't work. Finally I downgraded to Java 8 update 151 and it worked. Can finally get back to building Android apk's. I've seen a lot of people with similar issues and different things work for most. I tried all the other fixes I could find and this is the only one that worked for me, however I'm sure if I downloaded an older version of unity that would work too as I heard version 5 is pretty stable.

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

Answer by liortal · Jun 10, 2018 at 06:52 PM

Mirroring my answer from this stack overflow post:

The error happens due to this Unity bug (related to the latest Android SDK tools version). You can see in the error message that the "manifmerger" tool returns an error code (64):

stderr[ Error:Invalid command manifmerger ] stdout[ ] exit code: 64

The bug is fixed in the latest Unity (beta) version. There is a workaround, as described on that page:

Workaround for the customers. just open https://developer.android.com/studio/index.html scroll down to the bottom of that page go to downloads scroll down to the bottom of that page find Windows "tools_r25.2.3-windows.zip" download and unzip it or, on mac: find MacOSX "tools_r25.2.3-macosx.zip" download and unzip it. In the SDK path replace the tools folder.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

213 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 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 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 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 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 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 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 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 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 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

MissingMethodException: get_vuforiaEnabled() 3 Answers

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

BCE0044 unexpected char: 0xFEFF 2 Answers

Unity Editor & iOS - Download MP4 to Streaming Assets Folder 0 Answers

errors building on android 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