I am trying to convert string to class name.
My code is:
app.actNum = "third.class";
in.close();
//on test
// Intent intent = new Intent(this.context,Class.forName(app.actNum));
Intent dialogIntent = new Intent(getBaseContext(), Class.forName(app.actNum));
but get
get ClassNotFoundException on Class.forName android
When calling
Class.forName(), you should use the class’s name without the extension. So if your class is calledTestand is in the packagemypackage.tests, then you should use: