question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cordova cammands doesn't execute properly rather it hangs forever

See original GitHub issue

I am trying to run cordova command on my command line, but any comand i execute, the cordova process hungs forever and does not execute successfully for example, i am trying to build my cordova app for android, when i i type cordova run android --target=127.0.0.1:5000 --verbose i get the following report

No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Android Studio project detected
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at C:\Users\HP-15\Campus-Enotice-Android\platforms\android\app\src\main\res\xml\config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms\android\platform_www] to platforms\android\app\src\main\assets\www
Wrote out android application name "Campus E-Notice" to C:\Users\HP-15\Campus-Enotice-Android\platforms\android\app\src\main\res\values\strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000
Wrote out Android package name "co.bucktechnology.co" to C:\Users\HP-15\Campus-Enotice-Android\platforms\android\app\src\main\java\co\bucktechnology\co\MainActivity.java
This app does not have launcher icons defined
This app does not have splash screens defined
Updating resource files at platforms\android
Prepared android project successfully
No scripts found for hook "after_prepare".
ANDROID_HOME=D:\android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_111
studio
Subproject Path: CordovaLib
Subproject Path: app
Running command: cmd "/s /c "C:\Users\HP-15\Campus-Enotice-Android\platforms\android\gradlew.bat cdvBuildDebug -b C:\Users\HP-15\Campus-Enotice-Android\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m""
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Observed package id 'add-ons;addon-google_apis-google-24' in inconsistent location 'D:\android\sdk\add-ons\addon-google_apis-google-24-1' (Expected 'D:\android\sdk\add-ons\addon-google_apis-google-24')
Already observed package id 'add-ons;addon-google_apis-google-24' in 'D:\android\sdk\add-ons\addon-google_apis-google-24'. Skipping duplicate at 'D:\android\sdk\add-ons\addon-google_apis-google-24-1'
Observed package id 'add-ons;addon-google_apis-google-24' in inconsistent location 'D:\android\sdk\add-ons\addon-google_apis-google-24-1' (Expected 'D:\android\sdk\add-ons\addon-google_apis-google-24')
Already observed package id 'add-ons;addon-google_apis-google-24' in 'D:\android\sdk\add-ons\addon-google_apis-google-24'. Skipping duplicate at 'D:\android\sdk\add-ons\addon-google_apis-google-24-1'
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_9308avscpha59jkwt518ezcf1.run(C:\Users\HP-15\Campus-Enotice-Android\platforms\android\app\build.gradle:150)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:app:preBuild UP-TO-DATE
:app:preDebugBuild

And it stays like this for hours without executing further. What is its that am doing wrong? Am using npm version 6.4.1 and cordova version 8.1.2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
bucktechnologiescommented, Dec 22, 2018

It was an internet connection issue, my ISP blocked my google services temporarily hence causing the gradle service not to download the new and updated files… so anytime I run Cordova, it looks to continue with the downloading process, which causes the command line to hang. After I got a proper connection to Google services, everything was executed perfectly.

1reaction
jfoclpfcommented, Aug 24, 2020

NO, in my case, was something different, the gradle was locked. I had do delete the lock file.

find ~/.gradle -type f -name "*.lock" -delete
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cordova cammands doesn't execute properly rather it hangs ...
After I got a proper connection to Google services, everything was executed perfectly. Share. Share a link to this answer.
Read more >
[Done]-yeoman : yo command hangs forever - appsloveworld
Best coding solution for query yeoman : yo command hangs forever. ... command line hangs · Cordova cammands doesn't execute properly rather it...
Read more >
Android Platform Guide - Apache Cordova
Android Platform Guide. This guide will help set up your development environment for building Cordova apps for Android devices and optionally use ...
Read more >
hOK - River Thames Conditions
Alexa chung wardrobe, Cloudbreaker basto radio edit download, Can make calls from gmail! ... Kill running apps on iphone, Call for the 737...
Read more >
Amazon Developer Blogs
Launched last December, the Web App Starter Kit for Fire TV is an open source project ... Once you have your client app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found