[osg-users] Can't access to assets in Android

Daniel Ponsoda dponsoda at gmail.com
Wed Jul 11 06:40:41 PDT 2018

Hi everyone,

I just compiled the example project for Android (osgAndroidExampleGLES2) and can't figure out how to load osgt files I've put inside the apk (assets folder).

I'm trying to load cow.osgt using the load option that appears in the app's menu with no luck (no matter what path I give). The error message appearing in logcat is:

E/Osg Viewer: There are 1 models to load
              Loading: cow.osgt
W/Osg Viewer: Error reading file cow.osgt: file not found
E/Osg Viewer: Model not loaded

The file is located inside the assets folder in the apk root: /assets/cow.osgt

I tried these paths when loading:

The last thing I tried after read a solution in another topic on this forum is to copy the file cow.osgt to the external sdcard and set read permissions in the manifest but still appears the same error (file not found). The path I used for this was /storage/emulated/0/cow.osgt (anyway, I don't want to use the sd card in my app)

Any ideas on why is this happening?

Thank you, in advance!


Read this topic online here:

More information about the osg-users mailing list