Unable to build In unity : "UnityEditor.BuildPlayerWindow+BuildMethodException:"

Viewed 65474

The project runs just fine but I am unable to build it using build settings.

Here's the error message:

UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in <2f1c602eae0d45c293fff3e3aef759fa>:0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <2f1c602eae0d45c293fff3e3aef759fa>:0 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

7 Answers

[Problem Solved]

Just had to delete the "plugins" folder from the "Assets" folder of my project.

in unity unity 2018.3.1 check "use legacy SDK tools" (player settings >> publishing settings).

enter image description here

In my case I had to change the Player settings Build system from Gradle to Internal (Unity 2018.2.10f1)

enter image description here

Just change the buildSystem from Gradle to Internal. I solved my problem with it

enter image description here

I was getting a similar error message. The problem was that I tried to minify the android APK with 'Proguard'. Changing it to 'Gradle (Experimental)' in Player Settings did the trick.

In my case at least, I added a line to mainTemplate.gradle in dependencies { ... } (probably you don't have this file but in case some of you have) this line is:

implementation 'com.google.android.exoplayer:exoplayer:2.8.4'

The dependencies section become:

  dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.google.android.exoplayer:exoplayer:2.8.4'
**DEPS**}

I needed to add an implementation in it. The second line. Where I was wrong at I added a dumb , before that line. Because of that, It failed. If you put some , just delete it. I don't know it's gonna solve your problem but at my side it solved.

So I guess many of the answers above are right for many different people, but in my case it was due to a stupid fault which I had expected unity to automatically ignore

using UnityEditorInternal;

So basically when I closed my script editor it would finally open up a script after clicking the error message, since it didn't before, after looking I noticed it was using a unitiEditor reference, after commenting it it worked.

Related