离子应用程序无法运行,错误选项必须是对象

时间:2015-07-22 14:27:13

标签: cordova ionic-framework ionic cordova-plugins

我有一个失败的Ionic应用程序出现以下错误。知道如何解决或提示如何调试? (Cordova 5.1.1 + Ionic 1.4.3)

I/chromium(13497): [INFO:CONSOLE(20434)] "Error: "options" must be an object!
I/chromium(13497): at Object.N._ (file:///android_asset/www/lib/js-data.min.js:11:26882)
I/chromium(13497): at file:///android_asset/www/lib/js-data.min.js:10:23334
I/chromium(13497): at new a (file:///android_asset/www/lib/js-data-angular.min.js:10:1479)
I/chromium(13497): at g.d [as findAll] (file:///android_asset/www/lib/js-data.min.js:10:23262)
I/chromium(13497): at function._this.(anonymous function).defineResource.def.(anonymous function) (file:///android_asset/www/lib/js-data.min.js:11:6366)
I/chromium(13497): at f.service.findAll (file:///android_asset/www/js/application.js:4795:24)
I/chromium(13497): at loadTasks (file:///android_asset/www/js/application.js:2314:19)
I/chromium(13497): at file:///android_asset/www/js/application.js:2375:18
I/chromium(13497): at processQueue (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:22016:27)
I/chromium(13497): at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:22032:27", source: file:///android_asset/www/lib/ionic/js/ionic.bundle.js (20434)

1 个答案:

答案 0 :(得分:1)

这通常是cordova-android版本的问题。由于cordova 5.1.1默认的cordova-android是4.0.2,默认为android-22。你可能需要以前的版本。

试试这个:

cordova platform remove android
cordova platform add android@3.7.2