How to run cordova application in the real device? - android

i'm beginner in development cordova android ,i want to run my application cordova in the real device by when i excute this command cordova build android i found this error :
: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

try
cordova platform add android
cordova platform build android
adb devices (check if your device appears in the list)
cordova run android

Try installing the android sdk v.23.0.1:
cd /home/binov1/android-sdk-linux/tools
./android
The Android SDK Manager window will open, and you need to select SDK Platform API 23 and Android SDK Build-tools. If you want, you can install all SDK Platform and Build-tools of any API version.

Related

react-native run-android Starting JS server... Building and installing the app on the device (cd android && ./gradlew installDebug

After
react-native init Project
i do :
cd Project and
react-native run-android
my version is : nodejs v6.9.5
emulateur genymotion api 23
I have this error :
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> failed to find Build Tools revision 23.0.1
* 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: 4.309 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
Install Build Tools revision 23.0.1 on SDK

Ionic app build issue

I am new to ionic. I have developed sample application ionic.
When I try to execute below command it gives gradle error.
$ ionic build android
Below is the build error:
Error: /home/myapp/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred starting process 'Gradle build daemon'
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Gradle version is 3.3
Android SDK and Android Studio located in /usr/local/ folder
You will either have to move it to your home directory (that involves reinstall).
Or run ionic build commands with sudo
sudo ionic build android
You could technically change permissions of the specific sdk and studio folders but it is not advisable especially in /usr directory.

Unable to build Android using ionic

I am trying to setup Ionic framework for developing android apps on my mac but I am having some problems in building android apps.
I have followed following procedure for installing ionic :
Run: "sudo npm install -g cordova"
Run: "sudo npm install -g ionic"
Run: “android” then install the following packages
Tools: Andoird SDK Tools, Android SDK Platform-tools, Android SDK Build-tools
Android 4.4.2 (API 19)
Extras: Android Support Library
My .bash file is like this :
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=${JAVA_HOME}/bin:$PATH
export PATH=${PATH}:~/Library/Android/sdk/tools:~/Library/Android/sdk/platform-tools
This is the error I am getting while building android app :
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Running command: /Users/coderahul/sampleIonicApp/hooks/after_prepare/010_add_platform_class.js /Users/coderahul/sampleIonicApp
add to body class: platform-android
ANDROID_HOME=/Users/coderahul/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> failed to find target with hash string 'android-23' in: /Users/coderahul/Library/Android/sdk
* 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.299 secs
Error: /Users/coderahul/sampleIonicApp/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> failed to find target with hash string 'android-23' in: /Users/coderahul/Library/Android/sdk
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Please install Android target: "android-23".
Hint: Open the SDK manager by running: /Users/coderahul/Library/Android/sdk/tools/android
You will require:
1. "SDK Platform" for android-23
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)
This happened to me just type this in your terminal "/Users/coderahul/Library/Android/sdk/tools/android" and proceed with the steps to download the sdk for android-23.
This happens because your device is using the higher version of OS than the sdk version

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.

geetting error while running ionic crosswalk integration

i am new to ionic framework, i was unable to get the inspect elements when i debug my application on my android mobile, so i tried installing crosswalk
with the following steps
npm install -g ionic
ionic platform add android
ionic browser add crosswalk
i had followed the steps and even tried uninstalling the application and reverting the crosswalk, but the error remains same. this is the error which i am facing.
* What went wrong:
Execution failed for task ':processArmv7DebugManifest'.
> Manifest merger failed with multiple errors, see logs
* 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: 41.063 secs
G:\GTM\Ionic\ionic programs\recipes\platforms\android\cordova\node_modules\q\q.j
s:126
throw e;
^
Error code 1 for command: cmd with args: /s /c ""G:\GTM\Ionic\ionic programs\rec
ipes\platforms\android\gradlew" cdvBuildDebug -b "G:\GTM\Ionic\ionic programs\re
cipes\platforms\android\build.gradle" -PcdvBuildArch=arm -Dorg.gradle.daemon=tru
e"
ERROR running one or more of the platforms: Error: cmd: Command failed with exit
code 1
You may not have the required environment or OS to run this project
can anyone help me with this error.
thanks in advance.

Categories

Resources