Could not pre-launch appium: Error: Permission to start activity denied

I am getting the below error. is anyone aware of this issue. i have followed all necessary steps.
ro.build.version.sdk"

info: [debug] Device is at API Level 21
info: [debug] executing cmd: C:\Users\Sudhansu\AppData\Local\Android\sdk\platform-tools\adb.exe -s 4d00b25e4a0631d5 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.microsoft.office.lync15/com.microsoft.office.lync.ui.login.SigninActivity”
error: Permission to start activity denied.
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 1.415
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] UiAutomator shut down normally
error: Could not pre-launch appium: Error: Permission to start activity denied.

Node Server Process Ended

I have tried with both Samsung s3 and S5 and i am getting the same error.

Have you verified that you can start the application up using the command in the appium logs? I’ve highlighted it here.

I am getting the below exception. Could you please help me to resolve this issue?

C:\Users\Sudhansu\AppData\Local\Android\sdk\platform-tools>C:\Users\Sudhansu\AppData\Local\Android\sdk\platform-tools\adb.exe -s 4d00b25e4a0631d5 shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.microsoft.office.lync15/com.microsoft.office.lync.ui.login.SigninActivity”
Stopping: com.microsoft.office.lync15
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.microsoft.office.lync15/com.microsoft.office.lync.ui.login.SigninActivity }
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.microsoft.office.lync15/com.microsoft.office.lync.ui.login.SigninActivity } from null (pid=21863, uid=2000) not exported from uid 10014
at android.os.Parcel.readException(Parcel.java:1540)
at android.os.Parcel.readException(Parcel.java:1493)
at android.app.ActivityManagerProxy.startActivityAsUser(ActivityManagerNative.java:2531)
at com.android.commands.am.Am.runStart(Am.java:768)
at com.android.commands.am.Am.onRun(Am.java:307)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:102)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:255)

Sorry, @sudhansu_sahoo83, I’m not certain why it’s not starting. The good news is that you’ve narrowed the scope of your problem and it’s not an Appium problem.