Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Asset.loadAsync(moduleId) throws with `Error: resource id #0x0` on Android in Release mode

$
0
0

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.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>