You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2016/05/31 23:54:12 UTC

[jira] [Updated] (CB-9735) Restoring platform feature doesn't work on some projects without any platforms

     [ https://issues.apache.org/jira/browse/CB-9735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-9735:
---------------------------------
    Component/s: CordovaLib

> Restoring platform feature doesn't work on some projects without any platforms
> ------------------------------------------------------------------------------
>
>                 Key: CB-9735
>                 URL: https://issues.apache.org/jira/browse/CB-9735
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: 5.3.2
>         Environment: Windows 10 Enterprise or Mac OS
>            Reporter: Diego Geffner
>            Priority: Minor
>
> This bug seems to happen on a single project I have. I couldn't reproduce it on an empty project, so it might be project dependent.
> Summary:
> On one particular project which has WP8 and Android platforms (I tried to reproduce this with an empty new project but I couldn't do it)
> cordova platform ls --> Shows WP8 and Android
> cordova platform rm android wp8 --> Removes both platforms
> cordova platform ls --> Shows no platforms installed
> cordova build android --> Shows error message because there are not platforms installed. **Why didn't the restoring platform feature kicked in?**
> cordova platform add wp8 --> Adds wp8
> cordova build android --> Now restoring the Android platform works, and the project gets built.
> Full command:
> C:\workspaces\my_project_name>cordova platform ls
> Installed platforms: android 4.0.2, wp8
> Available platforms: amazon-fireos, blackberry10, browser, firefoxos, webos, windows, windows8
> C:\workspaces\my_project_name>cordova platform rm android wp8
> C:\workspaces\my_project_name>cordova platform ls
> Installed platforms:
> Available platforms: amazon-fireos, android, blackberry10, browser, firefoxos, webos, windows, windows8, wp8
> C:\workspaces\my_project_name>cordova build android
> No platforms added to this project. Please use `cordova platform add <platform>`.
> C:\workspaces\my_project_name>cordova platform add wp8
> Adding wp8 project...
> Creating Cordova Windows Project:
>         App Name  : My project name
>         Namespace : com.my_company.my_project_name
>         Path      : C:\workspaces\my_project_name\platforms\wp8
> Copying necessary files to C:\workspaces\my_project_name\platforms\wp8
> Updating project files
> C:\workspaces\my_project_name>cordova build android
> Restoring platform android@4.0.2 referenced on config.xml
> Adding android project...
> Creating Cordova project for the Android platform:
>         Path: platforms\android
>         Package: com.my_company.my_project_name
>         Name: My project name
>         Activity: MainActivity
>         Android target: android-22
> Copying template files...
> Android project created with cordova-android@4.0.2
> Running command: cmd "/s /c "C:\workspaces\my_project_name\platforms\android\cordova\build.bat --buildConfig=C:\workspaces\my_project_name\build.json""
> [Error: Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.]
> ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
> You may not have the required environment or OS to build this project
> Error: cmd: Command failed with exit code 2
>     at ChildProcess.whenDone (C:\Users\my_user_name\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
>     at emitTwo (events.js:87:13)
>     at ChildProcess.emit (events.js:172:7)
>     at maybeClose (internal/child_process.js:817:16)
>     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org