如何在真实设备中运行cordova应用程序?

时间:2016-03-01 10:24:14

标签: android jquery cordova apk

我是开发cordova android的初学者,我想在我执行此命令cordova build android时在真实设备中运行我的应用程序cordova我发现此错误:

:CordovaLib:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/binov1/android-sdk-linux/build-tools/23.0.1/aapt'' finished with non-zero exit value 127

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 29.066 secs
ERROR building one of the platforms: Error code 1 for command: /home/binov1/workElolinkMobile/icooltaxi/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/binov1/workElolinkMobile/icooltaxi/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
You may not have the required environment or OS to build this project
Error: Error code 1 for command: /home/binov1/workElolinkMobile/icooltaxi/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/binov1/workElolinkMobile/icooltaxi/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

2 个答案:

答案 0 :(得分:0)

尝试

cordova platform add android

cordova platform build android

adb devices(检查您的设备是否出现在列表中)

cordova run android

答案 1 :(得分:0)

尝试安装android sdk v.23.0.1

cd /home/binov1/android-sdk-linux/tools
./android

将打开Android SDK Manager窗口,您需要选择SDK Platform API 23Android SDK Build-tools。如果需要,您可以安装任何API版本的所有SDK PlatformBuild-tools