I am trying to load assets from the assets
folder into my Android application using Android Studio and Java
The code is simple, but it does not work
AssetManager assetManager = MainActivity.getAssets();
InputStream ims = assetManager.open("helloworld.txt");
The error is Non-static method 'getAssets()' cannot be referenced from a static context
There is no word static
anywhere in MainActivity class, was it statically instantiated?
HGow can I get around this? Where do I need to read the assets?
And how can I properly get assets if this is incorrect?
Additionally what imports do I need for AssetManager, I cannot find this