Entities 0.2.0-preview.18 build for Android with new BuildSettings

Hi.
I have just updated to the new package version and try to build a simple ECS project containing a sub-scene for Android. Should that work or is the Android build broken at the moment?

Using the old/standard build I am getting this error when running the app:

11-25 15:04:48.993 1019 1105 E Unity : Loading Entity Scene failed because the entity header file could not be found: 8284581b0923e254eb29907513493176
11-25 15:04:48.993 1019 1105 E Unity : NOTE: In order to load SubScenes in the player you have to use the new BuildSettings asset based workflow to build & run your player.
11-25 15:04:48.993 1019 1105 E Unity : jar:file:///data/app/com.MyCompany.MyEcsTest--CgXVfGYkXLVSMtrMyChKg==/base.apk!/assets/SubScenes/8284581b0923e254eb29907513493176.entityheader```

I have tried to set up the new build pipeline with the following BuildSettings:

![5210825--518744--upload_2019-11-25_15-7-46.png|471x505](upload://m61rnkRYjYcfw3UktCiSHkhM0jt.png)

This will fail with:

Build ClassicBuildSettings failed in BuildStepBuildClassicPlayer after 1.77s.
Invalid or unhandled enum Android (index 13)
at Unity.Build.Common.ClassicBuildProfile.GetExecutableExtension () [0x00062] in …\ecs_tests\Library\PackageCache\com.unity.entities@0.2.0-preview.18\Unity.Build.Common\Settings\ClassicBuildProfile.cs:80


Next I have tried editing ClassicBuildProfile.cs to handle Android in the switch case like this:

case BuildTarget.Android:
return ā€œ.apkā€;


With that I can build an APK and install it on a device.
Unfortunately it gives me the same "you have to use the new BuildSettings asset based workflow" error again when running the app.
3 Likes

Same issue here.

1 Like

Has anyone figured this out?

I ran into the same issue when doing the oldschool build&run flow, soI added all the scenes and subscenes to the .buildsettings config, but when I click the Build & Run button nothing happens. Not even an error, lol.

I had the same issue as you mate. Tried ā€˜Build & Run’, nothing happened, not even an error. Instead of ā€˜Build & Run’, I tried just ā€˜Build’ instead. Make sure you specify the output directory first. Once the build is finished, you have to navigate on your own to the output directory you specified before building, you will see that the .APK file will appear there magically. Hope this helps!

1 Like

Turns out I was just missing the ā€œClassic Scripting Settingsā€, which for some reason didn’t get added by default :roll_eyes:

1 Like