I have simple application in which I want to use component of library project that I imported.
I merged the manifest of library and main project by adding manifestmerger.enabled=true
in project.properties
so that I can use components of library project into main project.
But when I tried to start activity of library project from main project with the code below:
Intent intent = new Intent(MainActivity.this, ScanActivity.class);
intent.putExtra("scanType", REGISTER_BARCODE);
startActivity(intent);
I got the following errors
02-20 01:51:46.524: E/AndroidRuntime(23675): FATAL EXCEPTION: main
02-20 01:51:46.524: E/AndroidRuntime(23675): Process: com.example.smartdna_l1, PID: 23675
02-20 01:51:46.524: E/AndroidRuntime(23675): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.smartdna_l1/com.linksmart.smartdna6.ScanActivity}; have you declared this activity in your AndroidManifest.xml?
-
{com.example.smartdna_l1/com.linksmart.smartdna6.ScanActivity}
Where com.example.smartdna_l1
is main project package and com.linksmart.smartdna6.ScanActivity
is library project path.
The path which got detected is wrong.
Now my question is that how to avoid merging of path so appropriate activity path can be detected correctly to start the activity.