I am trying to get AssetManager
form a class in an Android library project, but I am getting the error:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
This is how I call it:
public class RevPluginLoader extends AppCompatActivity {
private List<String> copyPlugins() {
AssetManager assetManager = getAssets(); // This is where it all fails
}
}
How can I get the AssetManager
?