0

I read all other answers about this problem but it doesn't help me.

I have an app (MyApp) which include a library (named lib (example)). In my app, I call LoginActivity in my lib. But I have this exception.

java.lang.SecurityException: Permission Denial: starting Intent { cmp=fr.myotherapp/.activity.LoginActivity

Myotherapp is a other app which I created and installed in the same device.

I don't set "exported"="true" in myotherapp manifest because I dont want to use this one but I set "exported"="true" for the activity in the lib manifest. I use Android Studio. Why does Android want to use this one even if I call the activity like this ?

    final Intent intent = new Intent(mContext, fr.lib.activity.LoginActivity.class);

Thanks

Cocorico
  • 1,998
  • 1
  • 22
  • 38

1 Answers1

0

If you are using eclipse, try adding manifestmerger.enabled=true to your project.properties file.

relevant docs :

http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger#TOC-Android-Manifest-file-merging

https://roostertech.wordpress.com/2013/10/29/manifest-merger/

Abhishek V
  • 12,488
  • 6
  • 51
  • 63