首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

android中关于Sqlite的有关问题

2014-01-03 
android中关于Sqlite的问题1.不要在UI线程里调用getReadableDatabase ()或者getWritableDatabase ()方法?

android中关于Sqlite的问题

1.不要在UI线程里调用getReadableDatabase ()或者getWritableDatabase ()方法

? ? 参见androidAPI文档如下:

? ? Create a helper object to create, open, and/or manage a database. This method always returns very quickly. The database is not actually created or opened until one of getWritableDatabase() or getReadableDatabase() is called.

? ??Like?getWritableDatabase(), this method may take a long time to return, so you should not call it from the application main thread, including from?ContentProvider.onCreate().

? ? ?Database upgrade may take a long time, you should not call this method from the application main thread, including from?ContentProvider.onCreate().

?

热点排行