Android Gradle builds not respecting scene in build settings

Does anyone know how to ensure that the scenes and scene-order set in the Unity build settings actually applies to an apk built with Gradle?

I’ve tried the command "gradlew assembleDebug" in a command prompt and building in Android Studio without errors, yet the scene that loads is always one called "Login". Even if i ensure that only one, completely different scene, exists in the build settings, the "Login" scene always loads.

I’ve run gradlew build, cleaned out caches of all sorts, and tried different scripts for two days now I’m still stuck with the same damn problem. There must be a proper, easier solution for this.

3 Answers

3

Hi!
This discussion seems relevant:

Does this answer your question?

Hello! Thank you for your suggestion, but that's not quite what this is about. Changing the scene in build settings does nothing to solve this problem.

Hello!

Thank you for your suggestion, but that’s not quite what this is about. Changing the scene in build settings does nothing to solve this problem.

Hey,

You’re using gradle to build your apk. Did you reexport Unity project after changing Build settings (reordering scenes)?
Just to test - try doing “Build and Run” from Unity Editor and see if correct scene is loaded