2016-05-16 105 views
1

當我運行我的應用程序在我的Android設備與我有一個錯誤:流星錯誤:「com.meteor.webapp.WebAppException:錯誤解析資產清單」

meteor run android-device --settings settings.json --mobile-server=myip:port 

我已經部署了我的應用程序在我的VPS與MUP(流星)。在我的設備的應用程序似乎工作良好,並能與我的VPS進行溝通,但我有此錯誤:

I20160516-20:17:03.059(2)? W/MeteorWebApp(3915): Download failure I20160516-20:17:03.059(2)? W/MeteorWebApp(3915): com.meteor.webapp.WebAppException: Error parsing asset manifest I20160516-20:17:03.060(2)? W/MeteorWebApp(3915): at com.meteor.webapp.AssetManifest.(AssetManifest.java:80) I20160516-20:17:03.060(2)? W/MeteorWebApp(3915): at com.meteor.webapp.AssetBundleManager$1.onResponse(AssetBundleManager.java:112) I20160516-20:17:03.060(2)? W/MeteorWebApp(3915): at okhttp3.RealCall$AsyncCall.execute(RealCall.java:133) I20160516-20:17:03.061(2)? W/MeteorWebApp(3915): at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) I20160516-20:17:03.061(2)? W/MeteorWebApp(3915): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) I20160516-20:17:03.061(2)? W/MeteorWebApp(3915): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) I20160516-20:17:03.062(2)? W/MeteorWebApp(3915): at java.lang.Thread.run(Thread.java:818) I20160516-20:17:03.062(2)? W/MeteorWebApp(3915): Caused by: org.json.JSONException: Value (JSONObject.java:160) I20160516-20:17:03.063(2)? W/MeteorWebApp(3915): at org.json.JSONObject.(JSONObject.java:173) I20160516-20:17:03.063(2)? W/MeteorWebApp(3915): at com.meteor.webapp.AssetManifest.(AssetManifest.java:39)

我不明白爲什麼我有這樣的錯誤。當我在沒有--mobile-server = myip:port的本地運行應用程序時,不會顯示此錯誤。

回答

2

這是由於cordova清單不存在而導致的熱代碼推送失敗。要確認,請訪問http://myip:port/__cordova/manifest.json,它應返回類似於http://myip:port/manifest.json(非Cordova)的json文檔。如果您從cordova網址獲取應用程序/ html頁面,這意味着您的構建不包括移動平臺(您是否在構建之前刪除了它們)?

更新:您還需要確保包含mobileSettings和可能serverOnly在你的mup.js配置中。請參閱lib/modules/meteor/build.js以瞭解這些選項。

+0

denis-babineau:可以請你分享你的mup.json文件嗎?我遇到了同樣的問題,並且適用於移動設備的mup.json可能會有所幫助。 – rafahoro