cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wei jiang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-6301) Create Cordova platform wp8 or windows8 got error "Non-whitespace before first tag"
Date Wed, 09 Apr 2014 13:26:16 GMT

    [ https://issues.apache.org/jira/browse/CB-6301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13964128#comment-13964128
] 

wei jiang commented on CB-6301:
-------------------------------

I have found a solution for this issue:
1、open C:\Users\***\.cordova\lib\wp\cordova\3.4.0\wp8\bin\create.js
line 68:
change 
'var f=fso.OpenTextFile(filename,1,2);'
to 
'var f=fso.OpenTextFile(filename,ForReading,false,TristateFalse);'
line 75:
change 
'var f=fso.OpenTextFile(filename, ForWriting, TristateFalse);'
to 
'var f=fso.OpenTextFile(filename, ForWriting,true, TristateFalse);'

2、Change the encoding of these files to 'UTF-8 without BOM' 
in C:\Users\***\.cordova\lib\wp\cordova\3.4.0\wp8\template
App.xaml
App.xaml.cs
CordovaWP8AppProj.csproj
CordovaWP8Solution.sln
MainPage.xaml.cs
Properties\WMAppManifest.xml

ps:I did this using Notepad++

> Create Cordova platform wp8 or windows8 got error "Non-whitespace before first tag"
> -----------------------------------------------------------------------------------
>
>                 Key: CB-6301
>                 URL: https://issues.apache.org/jira/browse/CB-6301
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.4.0
>         Environment: Windows 8.1 Pro(Chinese-Simplified)
> Visual Studio 2013 Ultimate with Update 1(Chinese-Simplified)
>            Reporter: steelair
>              Labels: newbie
>             Fix For: 3.4.0
>
>         Attachments: 11.png, QQ截图20140408001056.png, 未标题-1.png
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> When I use Command-Line to add platforms like this:
> cordova platform add wp8
> cordova platform add windows8
> The issue occurs like this:
> C:\testproject>cordova platform add windows8
> Checking windows8 requirements...
> Creating windows8 project...
> Creating Cordova Windows 8 Project:
>         App Name : testproject
>         Namespace : testproject
>         Path : C:\testproject\platforms\windows8
> Project created
> [Error: Non-whitespace before first tag.
> Line: 0
> Column: 1
> Char: �]
> I got the same issue when I Add plugin like this:
> cordova plugin add org.apache.cordova.device
> The issue goes to:
> C:\testproject>cordova plugin add org.apache.cordova.device
> Fetching plugin "org.apache.cordova.device" via plugin registry
> Installing org.apache.cordova.device (windows8)
> Error: Non-whitespace before first tag.
> Line: 0
> Column: 1
> Char: �
>     at error (C:\Users\steelAir\AppData\Roaming\npm\node_modules\cordova\node_mo
> dules\elementtree\node_modules\sax\lib\sax.js:347:8)
>     at strictFail (C:\Users\steelAir\AppData\Roaming\npm\node_modules\cordova\no
> de_modules\elementtree\node_modules\sax\lib\sax.js:364:22)
>     at Object.write (C:\Users\steelAir\AppData\Roaming\npm\node_modules\cordova\
> node_modules\elementtree\node_modules\sax\lib\sax.js:603:11)
>     at XMLParser.feed (C:\Users\steelAir\AppData\Roaming\npm\node_modules\cordov
> a\node_modules\elementtree\lib\parsers\sax.js:48:15)
>     at ElementTree.parse (C:\Users\steelAir\AppData\Roaming\npm\node_modules\cor
> dova\node_modules\elementtree\lib\elementtree.js:263:10)
>     at Object.exports.XML (C:\Users\steelAir\AppData\Roaming\npm\node_modules\co
> rdova\node_modules\elementtree\lib\elementtree.js:593:13)
>     at Object.module.exports.parseElementtreeSync (C:\Users\steelAir\AppData\Roa
> ming\npm\node_modules\cordova\node_modules\plugman\src\util\xml-helpers.js:120:3
> 8)
>     at Object.module.exports.package_name (C:\Users\steelAir\AppData\Roaming\npm
> \node_modules\cordova\node_modules\plugman\src\platforms\windows8.js:35:36)
>     at PlatformMunger.generate_plugin_config_munge (C:\Users\steelAir\AppData\Ro
> aming\npm\node_modules\cordova\node_modules\plugman\src\util\config-changes.js:2
> 85:54)
>     at PlatformMunger.add_plugin_changes (C:\Users\steelAir\AppData\Roaming\npm\
> node_modules\cordova\node_modules\plugman\src\util\config-changes.js:211:29)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message