• 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 orizvida · Aug 09, 2018 at 03:54 PM · build-error

UnityEditor.BuildPlayerWindow+BuildMethodException

Hey, i am new to unity and i am trying to run and build on my android phone but i am getting this error

UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:187 at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:94 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

i have latest sdk tools and latest java why is that happening?,Hey, i am new to unity and i am trying to build and run on my android phone but i am getting this error: UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:187 at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:94 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I have jdk 8 and latest sdk-tools installed Why is this happening?

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by KratexYT · Nov 17, 2020 at 07:44 PM

Maybe, unity offered you install new ver sdk and you take the button accept. Unity not understood or not found you folder. I fix this. 1. Install in unity hub new version sdk or download up version unity and set the flag Android Build Support(Sdk, JDK and NDK) 2. After installing, in standart your unity set the new path to sdk. unity take in target api flag (automatic highest) 3. Select the new target api (very up target) api and build. Unity says you ("You dont have is very up api , do you want to select flag automatic highest" 4. You must take yes. Its help me. Good luck, bro. I am from Ukraine and my grammar may be lame.

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 sharpenedtriangle · Aug 19, 2018 at 03:09 PM

Hey, at first I had the same error, but then I updated my jdk, and changed the JDK-path of unity to the new JDK, and now I don't get the error.

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 $$anonymous$$ · Jun 24, 2019 at 02:20 AM 0
Share

I did, but it said unity requires java 8 only, so I had to switch back to older jdk

avatar image
0

Answer by WybrenAkker · Aug 09, 2018 at 05:16 PM

Hi @orizvida,

Unity currently uses some parts of older SDK's.

This Post might help you. If not let me know.

Comment
Add comment · Show 5 · 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 orizvida · Aug 10, 2018 at 12:28 PM 0
Share

I have tried this, i am still getting the error When it gets to "Building gradle project"

Im getting this error:

UnityEditor.BuildPlayerWindow+Build$$anonymous$$ethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuild$$anonymous$$ethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\$$anonymous$$ono\BuildPlayerWindowBuild$$anonymous$$ethods.cs:187 at UnityEditor.BuildPlayerWindow.CallBuild$$anonymous$$ethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\$$anonymous$$ono\BuildPlayerWindowBuild$$anonymous$$ethods.cs:94 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

avatar image WybrenAkker orizvida · Aug 10, 2018 at 12:43 PM 0
Share

Alright. There's some other things you can try. First of all make sure your build path does not lead to the assets folder of your project. Unity does not allow for .exe files to be built in the /Assets folder.


Second thing you can try is go to Assets/Reimport All.

If those don't work it might be something to do with your JD$$anonymous$$, or your build tools could be outdated. What version of Unity are you on?

I can look into your problem further if these fixes don't work either.

avatar image TooManySugar WybrenAkker · Nov 04, 2018 at 12:10 AM 0
Share

I'm having a variant of this issue but when targeting windows

UnityEditor.BuildPlayerWindow+Build$$anonymous$$ethodException: 2 errors at UnityEditor.BuildPlayerWindow+DefaultBuild$$anonymous$$ethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\$$anonymous$$ono\BuildPlayerWindowBuild$$anonymous$$ethods.cs:187 at UnityEditor.BuildPlayerWindow.CallBuild$$anonymous$$ethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\$$anonymous$$ono\BuildPlayerWindowBuild$$anonymous$$ethods.cs:94

Things work in editor but the build is totally glitched

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.

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

93 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

Related Questions

Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers

How can I stop the variable values reverting to its default values after being built? 1 Answer

APK Builder Failed 2 Answers

Unity deleting and crashing on Android APK build 0 Answers

After Build the game work in my computer only 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