Appium appium 真机运行报错 Permission Denial 而模拟器正常

jack · 2018年01月30日 · 最后由 马明辰 回复于 2020年05月30日 · 2706 次阅读

[2018-01-30 02:54:40][MJSONWP] Encountered internal error running command: Error: Error occured while starting App. Original error: Error executing adbExec. Original error: 'Command 'D:\sdk\platform-tools\adb.exe -P 5037 -s 2b41f220 shell am start -W -n com.r/com.Activity -S' exited with code 1'; Stderr: 'java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.r/com.Activity } from null (pid=28441, uid=2000) not exported from uid 10131
at android.os.Parcel.readException(Parcel.java:1684)
at android.os.Parcel.readException(Parcel.java:1637)
at android.app.ActivityManagerProxy.startActivityAndWait(ActivityManagerNative.java:3454)
at com.android.commands.am.Am.runStart(Am.java:630)
at com.android.commands.am.Am.onRun(Am.java:388)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:51)
at com.android.commands.am.Am.main(Am.java:121)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:300)'; Code: '1'
at Object.wrappedLogger.errorAndThrow (C:\Users\win\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:69:13)
at ADB.callee$0$0$ (C:\Users\win\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:101:9)
at tryCatch (C:\Users\win\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke as _invoke
at GeneratorFunctionPrototype.prototype.(anonymous function) as throw
at GeneratorFunctionPrototype.invoke (C:\Users\win\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
at

appium 1.7.2/win10
为什么夜神模拟器正常
怎么解决

共收到 3 条回复 时间 点赞

楼主解决了吗,我也遇见一样的问题了。。。

😭 每次都只看到问题没看到解决的办法

adb logcat | grep START 点击待测应用,获取启动 activity

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册