Expo asset's Asset.loadAsync(moduleId)
throws with Error: resource id #0x0
for a desired .xml
file on Android in Release mode. It works in Debug mode. The strange thing is that for .glb
files, it works both in Debug and in Release. xml
is added to metro.config.js
, just as glb
:
resolver: { assetExts: [ ...assetExts.filter((ext) => !['svg'].includes(ext)),'glb','babylon','xml' ], sourceExts: [...sourceExts, 'svg'] }
Does anyone have any idea on how to solve this?
Update:Changing the extension to txt
makes it work both on Debug and Release. Does anyone know why xml
is special, compared to glb
or txt
? I'd like to use the original extension, without any dirty hacks.