UnityEditor.BuildPlayerWindow+BuildMethodException: when building Unity project for iOS

I am using Unity 2017.1.Op4 and I keep getting the following error when building the project for iOS:

UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:162 
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:83 
UnityEditor.HostView:OnGUI()

The build folder is also empty. After making a Google search, a few recommended that I change the Product Name in the Player Settings.

Another workaround suggested: Clearing all errors and switching inspector to show Camera's components (it doesn't matter as long as it is not Player Settings window).

Both suggestions didn't work. How can I resolve this issue?

Upvotes: 3

Views: 6086

Answers (1)

Zhang Zy
Zhang Zy

Reputation: 11

I just had this problem and solved. I hope this helps the next person with this problem.

My code contained wrong code like here:

 #if UNITY_STANDALONE_WIN || UNITY_EDITOR
        Correct Code Hear
 #elif UNITY_ANDROID || UNITY_IPHONE
        Compiled Error Code Hear
 #else
 #endif

Upvotes: 1

Related Questions