how to create assets folder in android/app/src/main with eas?

I need to locate my .obj file in android/app/src/main/assets.
I’m using react-native-gl-model-view library to render 3d model.
It needs file to be located in that path.
So after the android folder generated with command “expo run:android”, I made assets folder in it and copied my .obj file.
In debug mode (expo run:android), works normally.
But after eas build (build type : apk), 3D model never show up.

I added obj file format in metro.config.js
defaultConfig.resolver.assetExts.push(“obj”);
I just need file to be located in android/app/src/main/assets
How can I do this?

are you importing the obj files statically in your code somewhere? any asset that is imported in code will be bundled in the application

no I don’t import it. I just want the file to be located in that path. the library use that path and import it self.
I tried to import but library don’t use file that i import. it returns error.
It says, locate file in assets folder or use uri(internet address) :smiling_face_with_tear:

It works with android studio.
After generate android folder($ expo run:android or $ expo eject), open it with android store.
And analyze that (I don’t know what that really is) to build then build apk.
That import 3d model perfectly.
I don’t know how to build with eas but android worked.
Let me know if anyone can build with eas thank you ^^

you can use a config plugin to copy the file when the project is generated in prebuild: Config Plugins - Expo Documentation

for example: expo/GoogleServices.ts at b7585e0a73f616a37dc53c98c28ce356ca39e34c · expo/expo · GitHub

2 Likes

thank you I figured out it.

for someone who is suffered by this issue like me.
I’ll leave link that helped me

2 Likes