写包裹的例外

时间:2013-06-11 11:50:24

标签: javascript android

我有javascript代码访问android的calender api并在android calender中创建事件,它在android 2.3姜饼中工作正常但它在Android 4.0及以上设备中不起作用,我没有那个访问日历api的javascript代码但是当我调试它时会显示我的错误日志

06-11 16:30:01.134: E/SQLiteLog(14281): (1) no such column: selected
06-11 16:30:01.134: E/DatabaseUtils(14281): Writing exception to parcel
06-11 16:30:01.134: E/DatabaseUtils(14281): android.database.sqlite.SQLiteException: no such column: selected (code 1): , while compiling: SELECT _id, name FROM Calendars WHERE (selected=1)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:882)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:493)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:65)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1370)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:421)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:354)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at com.android.providers.calendar.CalendarProvider2.query(CalendarProvider2.java:1211)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at com.android.providers.calendar.CalendarProvider2.query(CalendarProvider2.java:1180)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at com.android.providers.calendar.HtcCalendarProvider.query(HtcCalendarProvider.java:127)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.content.ContentProvider.query(ContentProvider.java:673)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.content.ContentProvider$Transport.query(ContentProvider.java:210)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:143)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at android.os.Binder.execTransact(Binder.java:367)
06-11 16:30:01.134: E/DatabaseUtils(14281):     at dalvik.system.NativeStart.run(Native Method)
06-11 16:30:01.139: W/webview_proxy(18685): java.lang.Throwable: Warning: A WebView method was called on thread 'WebViewCoreThread'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads.
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebView.checkThread(WebView.java:1916)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebView.loadUrl(WebView.java:786)
06-11 16:30:01.139: W/webview_proxy(18685):     at com.bonzai.view.BonzaiAdCore.injectJavaScript(BonzaiAdCore.java:2205)
06-11 16:30:01.139: W/webview_proxy(18685):     at com.bonzai.ormma.OrmmaUtilityController.createEvent(OrmmaUtilityController.java:219)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebViewCore.nativeMouseClick(Native Method)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebViewCore.nativeMouseClick(Native Method)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebViewCore.access$8100(WebViewCore.java:66)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebViewCore$EventHub.dispatchWebKitEvent(WebViewCore.java:2122)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebViewInputDispatcher.dispatchWebKitEvent(WebViewInputDispatcher.java:738)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebViewInputDispatcher.dispatchWebKitEvents(WebViewInputDispatcher.java:670)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebViewInputDispatcher.access$800(WebViewInputDispatcher.java:78)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebViewInputDispatcher$WebKitHandler.handleMessage(WebViewInputDispatcher.java:1237)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.os.Looper.loop(Looper.java:155)
06-11 16:30:01.139: W/webview_proxy(18685):     at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:851)
06-11 16:30:01.139: W/webview_proxy(18685):     at java.lang.Thread.run(Thread.java:864)

1 个答案:

答案 0 :(得分:1)

Calendars Api在Android 4.0(ICE_CREAM_SANDWICH)中已经升级。 我认为升级会在您的应用程序中产生问题。以下是Calender Api的一些链接,它可能对您有所帮助。

http://developer.android.com/about/versions/android-4.0.html#api http://developer.android.com/guide/topics/providers/calendar-provider.html#overview http://developer.android.com/sdk/api_diff/14/changes.html