Android Build: Failed: Can't add element from array property

I recently updated Defold to 1.3.5, and can’t get Android to bundle my game anymore.

Before it really starts doing anything useful, I get this error. There are no log files in the Android build folder. This error occurs on both MacOS and Windows 10.

Failed: Can't add element from array property

When I tried using bob.jar directly, there was additional line logged that mentioned a client_id.

I tried making a new project from the Asteroids sample and it worked fine, so it seems it’s related to my project. Any advice on what to check?

Ate you using extensions. If so, which ones? ( i.e is the client_id related to one of them?) test by removing the extensions one by one

I removed the extensions as you suggested, but no luck.

I also cleared out my custom bundle resources, Android manifest, and Native Extension manifest from game.project.

Very confusing since it builds fine locally for PC/Mac debugging. :confused:

Below are my Defold version and game.project. Seemed to work fine in prior versions, but I skipped a couple.

[project]
title = Apple Spider
version = 1.4.7
bundle_resources = /assets/bundle
dependencies#0 = https://github.com/rgrams/rendercam/archive/refs/tags/1.0.3.zip
dependencies#1 = https://github.com/AGulev/DefVideoAds/archive/refs/tags/4.4.0.zip
dependencies#2 = https://github.com/defold/extension-gpgs/archive/refs/tags/2.5.0.zip
dependencies#3 = https://github.com/subsoap/defsave/archive/refs/tags/v1.2.4.zip
dependencies#4 = https://github.com/defold/extension-iap/archive/refs/tags/4.0.0.zip
dependencies#5 = https://github.com/defold/extension-review/archive/refs/tags/3.1.0.zip
dependencies#6 = https://github.com/subsoap/defglot/archive/refs/heads/master.zip

[bootstrap]
main_collection = /main/main.collectionc
render = /rendercam/rendercam.renderc

[input]
game_binding = /input/game.input_bindingc
use_accelerometer = 0

[display]
width = 640
height = 1136
update_frequency = 0

[ios]
app_icon_120x120 = /assets/app_icons/Icon-120.png
app_icon_180x180 = /assets/app_icons/Icon-180.png
app_icon_76x76 = /assets/app_icons/Icon-76.png
app_icon_152x152 = /assets/app_icons/Icon-152.png
app_icon_57x57 = /assets/app_icons/Icon-57.png
app_icon_114x114 = /assets/app_icons/Icon-114.png
app_icon_72x72 = /assets/app_icons/Icon-72.png
app_icon_144x144 = /assets/app_icons/Icon-144.png
app_icon_167x167 = /assets/app_icons/Icon-167.png
launch_image_320x480 = /assets/launch_images/ios_launch_320x480.png
launch_image_640x960 = /assets/launch_images/ios_launch_640x960.png
launch_image_640x1136 = /assets/launch_images/ios_launch_640x1136.png
launch_image_750x1334 = /assets/launch_images/ios_launch_750x1334.png
launch_image_768x1024 = /assets/launch_images/ios_launch_768x1024.png
launch_image_1536x2048 = /assets/launch_images/ios_launch_1536x2048.png
launch_image_1024x768 = /assets/launch_images/ios_launch_1024x768.png
launch_image_1242x2208 = /assets/launch_images/ios_launch_1242x2208.png
launch_image_2208x1242 = /assets/launch_images/ios_launch_2208x1242.png
launch_image_2048x1536 = /assets/launch_images/ios_launch_2048x1536.png
launch_image_2048x2732 = /assets/launch_images/ios_launch_2048x2732.png
launch_image_2732x2048 = /assets/launch_images/ios_launch_2732x2048.png
launch_image_1334x750 = /assets/launch_images/ios_launch_1334x750.png
launch_image_1125x2436 = /assets/launch_images/ios_launch_1125x2436.png
launch_image_2436x1125 = /assets/launch_images/ios_launch_2436x1125.png
launch_image_1668x2224 = /assets/launch_images/ios_launch_1668x2224.png
launch_image_2224x1668 = /assets/launch_images/ios_launch_2224x1668.png
bundle_identifier = dev.skaterdad.applespider

[osx]
bundle_identifier = dev.skaterdad.applespider

[android]
app_icon_36x36 = /assets/app_icons/Icon-36.png
app_icon_48x48 = /assets/app_icons/Icon-48.png
app_icon_72x72 = /assets/app_icons/Icon-72.png
app_icon_96x96 = /assets/app_icons/Icon-96.png
app_icon_144x144 = /assets/app_icons/Icon-144.png
app_icon_192x192 = /assets/app_icons/Icon-192.png
input_method = HiddenInputField
package = dev.skaterdad.applespider
immersive_mode = 1
debuggable = 0
version_code = 1047
manifest = /AndroidManifest.xml
target_sdk_version = 31
display_cutout = 0
minimum_sdk_version = 19

[script]
shared_state = 1

[physics]
gravity_y = 0.0
scale = 0.01
max_collisions = 200
max_contacts = 200
trigger_overlap_capacity = 300

[sprite]
max_count = 500

[particle_fx]
max_count = 200
max_particle_count = 2048

[gui]
max_particlefx_count = 20

[gpgs]
app_id = 418086620093
use_saved_games = 0
request_server_auth_code = 0
request_id_token = 0

[library]
include_dirs = 

[iap]
auto_finish_transactions = 0

[native_extension]
app_manifest = /engine.appmanifest

[graphics]
texture_profiles = /compressed.texture_profiles


I’ve done more experimenting.

1.3.4, 1.3.5, and 1.3.6beta all fail.

1.3.3 works just fine.

The more detailed error message from bob.jar is below. This happens pretty much instantly, like it hasn’t even called the build server or started a log file yet. Pretty bizarre.

Can't add element from array property
Cause: java.lang.NumberFormatException: For input string: "client_id"

I see you have a custom manifest for Android. Check how it digfere from our built in manifest and see if there is some clie there.

pls update your gpgs extension to version 2.5.1

that should help

1 Like

Thanks @AGulev , that fixed it!

Weird how I was still getting errors after removing the GPGS extension, but maybe there were some cache files I needed to clear.

Appreciate both of your help! Back to Defolding :rocket:

3 Likes