简体   繁体   中英

Cordova ionic application won't start on device

my case the driver is ok and the device is connected:

adb devices List of devices attached 7F602C136346331 device

but when i execute this command:

ionic run android -l -c

i found this error :

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':CordovaLib:processDebugResources'.

    java.io.IOException: Cannot run program "/home/binov1/android-sdk-linux/build-tools/23.0.1/aapt": error=2, No such file or directory

  • 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: 2.28 secs

/home/binov1/workElolinkMobile/ElolinkProject/platforms/android/cordova/node_modules/q/q.js:126 throw e; ^ Error code 1 for command: /home/binov1/workElolinkMobile/ElolinkProject/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/binov1/workElolinkMobile/ElolinkProject/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true ERROR running one or more of the platforms: Error: /home/binov1/workElolinkMobile/ElolinkProject/platforms/android/cordova/run: Command failed with exit code 8 You may not have the required environment or OS to run this project

Is a problem with the build.

Install the andoid sdk https://developer.android.com/sdk/index.html#download

verify tools and android tools is well declared in the path

export PATH=$PATH:/path/to/tools
export PATH=$PATH:/path/to/platform-tools

update android run command

> android update sdk

and try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM