I have two modules. App and module Test. Module app contains MainActivity with button. Module Test contains MainActivity two. I want to run Test/MainActivity from module app by click on button. But Android still cannot see MainActivity from module Test. See below.
Module app Manifest:
<?xml version="1.0" encoding="utf-8"?>
Module Test manifest:
<?xml version="1.0" encoding="utf-8"?>
Code in Module app MainActivity for click button and run second Activity:
public void runActivity(View view) {
Intent intent = null;
try {
intent = new Intent(this, Class.forName("com.example.test.MainActivity"));
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
}
}
In Console I get an error:
W/System.err: java.lang.ClassNotFoundException: com.example.test.MainActivity
EDIT: In app build.gradle file I have:
implementation project(path:':test', configuration:'default')
EDIT 2: Here is link with complete example that not working.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)