user@admin-HP-Pavilion-g6-Notebook-PC:~/myapp$ cordova run androidRunning command: /home/user/myapp/hooks/after_prepare/010_add_platform_class.js /home/user/myapp
add to body class: platform-android
Running command: /home/user/myapp/platforms/android/cordova/run
ERROR: Error: Please install Android target: "android-22".
提示:运行以下命令打开SDK管理器:/home/user/Android/android-sdk-linux/tools/android
你需要:
ERROR运行一个或多个平台:错误:/ home / user / myapp / platforms / android / cordova / run:命令失败,退出代码为2 您可能没有运行此项目所需的环境或操作系统
错误:执行错误&#34; google-chrome --user-data-dir = / tmp / temp_chrome_user_data_dir_for_cordova http://localhost:8000/index.html&#34;:/ bin / sh:1:google-chrome:not found < / p>
at /home/user/myapp/platforms/browser/cordova/node_modules/cordova-serve/src/exec.js:34:26
at ChildProcess.exithandler (child_process.js:758:5)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Socket.<anonymous> (child_process.js:1183:11)
at Socket.emit (events.js:107:17)
at Pipe.close (net.js:485:12)
ERROR运行一个或多个平台:错误:/ home / user / myapp / platforms / browser / cordova / run:命令失败,退出代码为1 您可能没有运行此项目所需的环境或操作系统
答案 0 :(得分:0)
运行(这特定于您的错误,路径可能因其他人而异)
/home/user/Android/android-sdk-linux/tools/android
确认当前安装了以下内容:
&#34; SDK平台&#34;对于android-22
&#34; Android SDK平台工具(最新)
&#34; Android SDK Build-tools&#34; (最新)