opened
bucktechnologies
username_0
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
Cordova cammands doesn't execute properly rather it hangs forever
issue
created
janpio
username_1
Does `cordova run android` work for a new project created with `cordova create`?
comment
created
bucktechnologies
username_0
anything i type with cordova, just hangs.... for example when i type `cordova create example.co`  i get
`Creating a new cordova project.

`
that is it... its still loading
comment
created
janpio
username_1
`cordova -v`?
comment
created
bucktechnologies
username_0
when i run `cordova -v -verbose` i get `8.1.2 (cordova-lib@8.1.1)` that is it, it doesnt terminate the process after.
am using windows, so my CMD is using memory
comment
created
bucktechnologies
username_0
this is a view of what i get [https://jmp.sh/v/ubuY6paaRG5AkqDEGYDR](https://jmp.sh/v/ubuY6paaRG5AkqDEGYDR)
comment
created
janpio
username_1
What is using those other 22% of CPU? Something blocking file access maybe?
How long did you wait?
comment
created
janpio
username_1
Does `cordova info` work?
comment
created
bucktechnologies
username_0
google chrome and steam applications. and currents i am still waiting for the saving android@~7.1.4 into config.xml file... to finish
comment
created
bucktechnologies
username_0
yes it works but as i said, after they run, they don't terminate and just there hanging
comment
created
bucktechnologies
username_0
i get this when i run `cordova info`

`Collecting Data...


Node version: v10.14.2

Cordova version: 8.1.1

Config.xml file:

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>HelloCordova</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
    <engine name="android" spec="~7.1.4" />
</widget>


Plugins:

cordova-plugin-whitelist

Error retrieving Android platform information:
Android SDK is not set up properly. Make sure that the Android SDK 'tools' and 'platform-tools' directories are in the PATH variable.

Error: cmd: Command failed with exit code 1 Error output:
'android' is not recognized as an internal or external command,
operable program or batch file.`
comment
created
bucktechnologies
username_0
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.
comment
closed
bucktechnologies
username_0
issue
created
jfoclpf
username_2
@username_0 can you tell us exactly what services were not available (urls or domains)? I'm having the same issue. I think it has to do with gradle, but I am unable to debug it.
comment
created
jfoclpf
username_2
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
```
comment