Search Issue Tracker

Fixed in 2019.1.X



Found in


Issue ID




[Android] IndexOutOfRangeException is thrown when refreshing device list with the build window closed

Deployment Management


IndexOutOfRangeException is thrown on switching the platform to Android when Assets are present in the Project

Steps to Repro:
1. Open a new project
2. Make sure you don't have a device plugged into your machine
3. Open android build settings
4. Click on "Refresh" near "Run Device" section
5. Close the build settings window before the refresh is complete
6. Notice the error in the console

In theory, this should also be possible with a device connected, but the refersh is very fast when there's a device. It's a lot slower without one.

Actual Result:
IndexOutOfRangeException error appears in console once Platform is switched

Windows Only

Occurring with:

Working with:
2019.1.0a12, 2018.3.0f2

Stack Trace:
IndexOutOfRangeException: Index was outside the bounds of the array.UnityEditor.Android.AndroidBuildWindowExtension.GetBuildPlayerWindow () (at <aaaad43e3ca74cf4bd3aa90120b5daff>:0)UnityEditor.Android.AndroidBuildWindowExtension.RepaintTargetList () (at <aaaad43e3ca74cf4bd3aa90120b5daff>:0)UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)

Comments (5)

  1. Machlou_Med

    Apr 29, 2020 09:37

    I had the same issue and the fix was to create the project in a different folder. It might be permission issues in your windows file system. You should try to save your project into C:\Unity3D-AR or something like in this folder.

  2. KingKong320

    Aug 21, 2019 07:27

    You can try going to Build Settings [in File->Build Settings or hit (Ctrl+Shift+B)] and click Player Settings (Also can be accessed from Edit->Project Settings-> Player) and in the Inspector window select Other Settings. Under Rendering see if the following options are checked:

    Auto Graphics API

    Multithreaded Rendering

    Static Batching

    Dynamic Batching

    Lightmap Streaming Enabled

    And that's is.

  3. makinahmet

    Mar 05, 2019 22:33

    I have same problem on 2018.3.7f1

    IndexOutOfRangeException: Index was outside the bounds of the array.
    UnityEditor.Android.AndroidBuildWindowExtension.GetBuildPlayerWindow () (at <76abbd884b37447da464288ec1125ab8>:0)
    UnityEditor.Android.AndroidBuildWindowExtension.RepaintTargetList () (at <76abbd884b37447da464288ec1125ab8>:0)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)

  4. Matanpjelly

    Feb 24, 2019 08:40

    i have this issue on all versions of 2018.3.x

  5. popoved1975

    Jan 03, 2019 13:21

    I have this error on 2018.3.0f2

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.