如何在真实设备中运行cordova应用程序?
问题描述:
我是初学者在开发Android的科尔多瓦,我想,当我EXCUTE此命令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
答
尝试
cordova platform add android
cordova platform build android
adb devices
(检查您的设备是否出现在列表中)
cordova run android
答
尝试安装android sdk v.23.0.1
:
cd /home/binov1/android-sdk-linux/tools
./android
Android的SDK管理器窗口会打开,您需要选择SDK Platform API 23
和Android SDK Build-tools
。如果你愿意,你可以安装任何API版本的所有SDK Platform
和Build-tools
。
错误:平台android已添加。 root @ binov1-HP-15-Notebook-PC:/ home/binov1/workElolinkMobile/icooltaxi#adb devices 连接的设备列表 7F602C136346331 \t设备 –