Build succeeded but a gradle error gets thrown - android

I've setup my Cordova tools on Visual Studio 2015 update 3.
I am currently using Cordova version 7.1.0 and created a blank Cordova project, but when building this error gets print on the build output:
Command finished with error code 0: cmd /s /c "path\to\project\platforms\android\gradlew.bat cdvBuildDebug -b path\to\project\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true"
Regardless the error, the application seems to be working fine and it loads correctly on the Android emulator.
Any idea of what the problem could be?
Thanks in advance :)

Actually, error code 0 here means that there wasn't any error at all, so you can safely ignore that message.
You should worry only when you don't see error code 0, that's when you'll get errors but usually they have a detailed description included.

Related

I am learning flutter and the project is giving 'Gradle task assembleDebug failed with exit code 1'

I am learning flutter and the project is giving 'Gradle task assembleDebug failed with exit code 1'
It is just giving the error just in emulator and working fine in windows and browser. and this is the error I am getting while debugging in vs code
Can anyone please help me with this
I searched everywhere but didn't find anything to solve this issue
First of all run:
C:\src\flutter>flutter doctor
And make sure that there are no errors.
Secondly, make:
C:\src\flutter>flutter create myproj
And follow the instructions.
The correct output should be:
C:\Users\hp\Projects\test>flutter create myproj
Creating project myproj...
Running "flutter pub get" in myproj... 2.859ms
Wrote 127 files.
All done!
In order to run your application, type:
$ cd myproj
$ flutter run
Your application code is in myproj\lib\main.dart.

"Error ; spawn cmd ENOENT" in ionic (ionic build android command)

I am building an app using ionic framework.
when I execute the command 'ionic build android' it is showing the following message.
C:\Windows\System32\todo>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Windows\System32\todo\hooks\after_prepare\010_add_platform_class.js C:\Windows\System32\todo
add to body class: platform-android
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk\
JAVA_HOME=C:\Program Files\java\jdk1.8.0_66
Error: spawn cmd ENOENT
I am running it on a windows 7 system using node.js command prompt
I have googled, but couldn't find any helpful solution.
Plese help. Thanks in advance
This issue may be due to your are not set current path of npm(C:\Users\\AppData\Roaming\npm) in environment variable.
On some systems, it was the problem of access:
Android Studio 3.0 removes the execute permission from Gradle, breaking the build
you can change the permissions and check the result!
The problem may come from windows services. Windows child process services not running properly.
In windows, OS => Go to System Config and enable all services and restart the computer. For more details check here.

nativescript sample projects fail with error Command ant failed with exit code 1

I went through the setup steps - on mac - but the sample nativescript projects all fail with the same error.
"Command ant failed with exit code 1"
Here is the log trace:
https://gist.github.com/getsetbro/c0225e8fc493d57b3f64
Other info
Android Studio on this mac run projects fine in emulators and connected devices
The same projects run in ios emulator without errors.
I installed JDK 8, never had version 7 on this system.
I see the following error in the logs.
Cannot run program "/Users/sb/Documents/Dev/nativescript/test_nativescript/platforms/android/${aapt}"
I might be wrong but it seems aapt tool is missing from your $PATH environment variable. If this is the case, try adding <ANDROID_SDK_ROOT>/tools to $PATH

Cordova Build Failed: Error starting modern compiler

HI i am trying to generate cordova 3.5.1.jar .but getting the below error in my command prompt window.Can any one help to sp
BUILD FAILED
E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\too
ls\ant\build.xml:720: The following error occurred while executing
this line:
E:\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.xml:734: Error starting modern compiler
Total time: 5 seconds
You probably have messed up with your Java installation by accident.
If you want to troubleshoot Cordova build process you could run command below:
cd <path/to/project>
ant -v -f ./platforms/android/build.xml debug
assuming that you are using cordova tool for the running build.

Appium - reset.sh fails with error on "buildAndroidBootstrap" task on Mac

There could be a problem with my configuration, but I cannot figure out what's wrong. I am trying to get appium set up on a Mac for automated testing.
I am running this command:
./reset.sh --android --verbose
I always fail on this step:
* Building Android bootstrap
Running "buildAndroidBootstrap" task
Fatal error: Error finding ant binary, is it on your path?
---- FAILURE: reset.sh exited with status 1 ----
My path is as follows:
# Android and appium config
export ANDROID_HOME=/usr/local/opt/android-sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
What am I doing wrong? Is my path missing something crucial? Googling to try and find out what the ant library is hasn't yielded me much results - what is it? Any help appreciated.
Turns out ant is an apache tool, without which reset.sh will fail for Android. Installing ant with brew fixed the problem.

Categories

Resources