Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 尝试运行自动脚本在实际设备上启动应用程序时发生Appium错误_Android_Appium - Fatal编程技术网

Android 尝试运行自动脚本在实际设备上启动应用程序时发生Appium错误

Android 尝试运行自动脚本在实际设备上启动应用程序时发生Appium错误,android,appium,Android,Appium,朋友们, 下面是appium错误日志:你能帮我解决这个问题吗 我是作为junit运行的,我应该作为testng/android应用程序运行吗? AndroidMainfest.xml: } = 信息:[调试]正在清理应用程序会话 错误:无法启动应用程序会话,错误为:错误:hasInternetPermissionFromManifest失败。错误:命令失败:C:\Windows\system32\cmd.exe/s/C“C:\Users\GangaiahL\AppData\Local\Andro

朋友们, 下面是appium错误日志:你能帮我解决这个问题吗

我是作为junit运行的,我应该作为testng/android应用程序运行吗? AndroidMainfest.xml: }

=

信息:[调试]正在清理应用程序会话 错误:无法启动应用程序会话,错误为:错误:hasInternetPermissionFromManifest失败。错误:命令失败:C:\Windows\system32\cmd.exe/s/C“C:\Users\GangaiahL\AppData\Local\Android\sdk\build tools\23.0.1\aapt.exe转储标记” 错误:未指定转储文件

at C:\Program  Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1664:19
at     ChildProcess.exithandler (child_process.js:758:5)
at ChildProcess.emit (events.js:110:17)
   at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit     (child_process.js:1088:5)

信息:[调试]错误:hasInternetPermissionFromManifest失败。错误:命令失败:C:\Windows\system32\cmd.exe/s/C“C:\Users\GangaiahL\AppData\Local\Android\sdk\build tools\23.0.1\aapt.exe转储标记” 错误:未指定转储文件

at C:\Program  Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1664:19
at     ChildProcess.exithandler (child_process.js:758:5)
at ChildProcess.emit (events.js:110:17)
   at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit     (child_process.js:1088:5)
信息:[调试]响应客户端时出错:{“状态”:33,“值”:{“消息”:“无法创建新会话。(原始错误:hasInternetPermissionFromManifest失败。错误:命令失败:C:\Windows\system32\cmd.exe/s/C\”C:\Users\GangaiahL\\AppData\Local\Android\sdk\build tools\23.0.1\aapt.exe转储标记\“\n错误:未指定转储文件\r\n)”,“origValue”:“hasInternetPermissionFromManifest失败。错误:命令失败:C:\\Windows\system32\cmd.exe/s/C\“C:\Users\GangaiahL\AppData\Local\Android\sdk\build-tools\23.0.1\aapt.exe转储标记\”\n错误:未指定转储文件\r\n“},“sessionId”:null}
信息:您能否共享代码片段,以便在实际设备上启动应用程序错误:hasInternetPermissionFromManifest失败--这表示应用程序没有internet权限。请启用此功能。@DarshanAmbhaikar请查看共享的.javafile@PankajKatiyar您能告诉我如何启用此功能吗?您的manifest.xml是否设置了internet权限??
at C:\Program  Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1664:19
at     ChildProcess.exithandler (child_process.js:758:5)
at ChildProcess.emit (events.js:110:17)
   at maybeClose (child_process.js:1016:16)
at Process.ChildProcess._handle.onexit     (child_process.js:1088:5)
##Error 1:

    By seeing your java code, I see this line is the problem:
    capabilities.setCapability("app","app.getAbsolutePath()");

    If app is a variable then it should be without quotes like:
    capabilities.setCapability("app",app.getAbsolutePath());

    Because of this appium can't find the app file to dump.


## Error 2:

Change these:

   File appDir = new File ("Computer\\Lokesh Gangaiah\\Phone\\Download");
   File app = new File (appDir,"selendroid-test-app-0.17.0.apk");

to:
   File app = new File ("Computer\\Lokesh Gangaiah\\Phone\\Download\\selendroid-test-app-0.17.0.apk");

And make sure you have apk file at this location.