2015-07-28 41 views
1

我已經使用」cordova build android「構建了我的應用程序(cordova,ionic)。但是,雖然它是建立我得到一個藍色屏幕..現在我不能建立應用程序,而不是「離子建設...」或「科爾多瓦建立...」cordova構建Android和離子構建Android結果在「藍色屏幕後的」SyntaxError:意外的令牌「

我已經更新nodeJS,科爾多瓦和離子使用npm ..但仍然得到同樣的錯誤,我甚至從今天早上恢復了我的每日備份,錯誤仍然存​​在。

錯誤:

C:\***\DEV\App\flugdeck>cordova build android 

Running command: "C:\Program Files\nodejs\node.exe" "C:\***\DEV\App\flugdeck\hooks\before_prepare\01_jshint.js" "C:\***\DEV\App\flugdeck" 

Linting www/js/app.js 
File www/js/app.js has no errors. 
----------------------------------------- 
Linting www/js/config.js 
File www/js/config.js has no errors. 
----------------------------------------- 
Linting www/js/controllers.js 
File www/js/controllers.js has no errors. 
----------------------------------------- 
Linting www/js/controller_flightlog.js 
File www/js/controller_flightlog.js has no errors. 
----------------------------------------- 
Linting www/js/controller_infotools.js 
File www/js/controller_infotools.js has no errors. 
----------------------------------------- 
Linting www/js/controller_timetools.js 
File www/js/controller_timetools.js has no errors. 
----------------------------------------- 
Linting www/js/directives.js 
File www/js/directives.js has no errors. 
----------------------------------------- 
Linting www/js/factories.js 
File www/js/factories.js has no errors. 
----------------------------------------- 
Linting www/js/filters.js 
File www/js/filters.js has no errors. 
----------------------------------------- 
Linting www/js/mymodules.js 
File www/js/mymodules.js has no errors. 
----------------------------------------- 
Linting www/js/services.js 
File www/js/services.js has no errors. 
----------------------------------------- 
Linting www/js/templates.js 
File www/js/templates.js has no errors. 
----------------------------------------- 

SyntaxError: Unexpected token 
    at Object.parse (native) 
    at Function.PlatformJson.load (C:\Users\MyUserName\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\util\PlatformJson.js:35:21) 
    at Object.handlePrepare (C:\Users\MyUserName\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\prepare.js:48:37) 
    at C:\Users\MyUserName\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:105:21 
    at Array.map (native) 
    at C:\Users\MyUserName\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:70:40 
    at _fulfilled (C:\Users\MyUserName\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:787:54) 
    at self.promiseDispatch.done (C:\Users\MyUserName\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:816:30) 
    at Promise.promise.promiseDispatch (C:\Users\MyUserName\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:749:13) 
    at C:\Users\MyUserName\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:557:44 
+0

你有'json'配置文件時,語法錯誤開始建立 –

回答

4
  1. 備份VOM kompletten Projektordner ERSTELLEN
  2. MIT科爾多瓦平臺RM安卓死Plattformunterstützung獻給安卓entfernen
  3. 書房physikalischen Ordner projektroot /平臺/ Android的entf​​ernen
  4. MIT科爾多瓦平臺添加android wieder模塊平臺運行平臺
  5. MIT科爾多瓦運行機器人einmal勞芬拉森
  6. AUS DEM的備份死的AndroidManifest.xml在書房平臺/機器人-Ordner kopieren UNDüberschreiben
  7. MIT科爾多瓦構建Android模具debug.apk ERSTELLEN拉森

我找到了一個解決辦法

  1. 備份您的完整的應用程序,文件夾
  2. 刪除Android的支持度f ROM與命令的應用「科爾多瓦平臺去除機器人」
  3. 刪除文件夾根/平臺/ Android的
  4. 添加平臺支持使用命令「科爾多瓦平臺添加機器人」
  5. 運行一次用命令「科爾多瓦運行Android的」
  6. 複製,並覆蓋現有的「AndroidManifest.xml中」從備份到「根/平臺/機器人」 - 文件夾
  7. 運行命令「科爾多瓦構建Android」