我遇到了Microsoft Visual Studio 2013识别Android SDK的问题。我把它放在系统环境变量上并检查它是否一遍又一遍。但是,有时当我打开一个apache cordova项目时,头版告诉我它没有正确安装。我已尝试卸载并重新安装它。我必须在Microsoft Visual Studio设置中手动添加到android SDK文件夹的路径,尽管我在系统变量下配置了ADT_HOME。 忽略首页上的错误,我可以在" Ripple - Nexus(Galaxy)"上构建和部署应用程序。这让我相信SDK正在运行。但是,当我连接手机并在设备上运行或选择Android模拟器时,它不起作用。这是我尝试在手机上运行时获得的内容。
1>------ Build started: Project: IOweYou, Configuration: Debug Android ------
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\TypeScript\Microsoft.TypeScript.targets(95,5): warning : The TypeScript Compiler was given no files for compilation, so it will skip compiling.
1> GeneratedJavascript=
1> C:\Users\Sudin\Documents\Visual Studio 2013\Projects\IOweYou\IOweYou>call "C:\Program Files\nodejs\"\nodevars.bat
1> Your environment has been set up for using Node.js 0.12.2 (x64) and npm.
1> ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\gl4alorm.pjd\packages\vs-mda
1> ------ Name from source package.json: vs-mda
1> ------ Version from source package.json: 0.1.75
1> ------ Current globally installed version: 0.1.75
1> ------ Package already installed globally at correct version.
1>MDAVSCLI : [javac] warning : [options] source value 1.5 is obsolete and will be removed in a future release
1>MDAVSCLI : [javac] warning : [options] target value 1.5 is obsolete and will be removed in a future release
1>MDAVSCLI : [javac] warning : [options] To suppress warnings about obsolete options, use -Xlint:-options.
2>------ Deploy started: Project: IOweYou, Configuration: Debug Android ------
2>Starting launch process C:\Program Files\nodejs\node.exe "C:\Users\Sudin\AppData\Roaming\npm\node_modules\vs-mda\emulator.js" --platform android --path "C:\Users\Sudin\Documents\Visual Studio 2013\Projects\IOweYou\IOweYou\bld\Debug" --deployTarget "device" --language en-AU --configuration debug
2> Generating config.xml from defaults for platform "android"
2> Calling plugman.prepare for platform "android"
2> Preparing android project
2> Processing configuration changes for plugins.
2> Iterating over installed plugins: []
2> Writing out cordova_plugins.js...
2> Wrote out Android application name to "IOweYou"
2> This app does not have launcher icons defined
2> Wrote out Android package name to "io.cordova.IOweYou"
2> Running command: cmd "/s /c ""C:\Users\Sudin\Documents\Visual Studio 2013\Projects\IOweYou\IOweYou\bld\Debug\platforms\android\cordova\run.bat" --nobuild --device --debug""
2> Skipping build...
2> Built the following apk(s):
2> C:\Users\Sudin\Documents\Visual Studio 2013\Projects\IOweYou\IOweYou\bld\Debug\platforms\android\ant-build\CordovaApp-debug.apk
2>C:\Users\Sudin\Documents\Visual Studio 2013\Projects\IOweYou\IOweYou\bld\Debug\platforms\android\cordova\node_modules\q\q.js:126
2>throw e;
2>^
2>ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: Error executing "adb devices": 'adb' is not recognized as an internal or external command,
2>operable program or batch file.
2> Command finished with error code 1: cmd /s /c ""C:\Users\Sudin\Documents\Visual Studio 2013\Projects\IOweYou\IOweYou\bld\Debug\platforms\android\cordova\run.bat" --nobuild --device --debug"
2>
2>C:\Users\Sudin\Documents\Visual Studio 2013\Projects\IOweYou\IOweYou\bld\Debug\platforms\android\cordova\node_modules\q\q.js:126
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
此外,有没有办法将构建的包导出到APK文件中,以便我可以手动将其安装到手机上?