2

我正在尝试将网格视图的内容“重置”为其初始值。从我在 Create 上的活动中,我有

    gridView = (GridView) findViewById(R.id.gridv);
    gridView.setNumColumns(gridsize);

    gridView.setAdapter(new Adapter(this, temp,gridsize));

然后当我尝试重置它时,我这样做了(从活动中的另一个函数调用)

      gridView.setAdapter(new Adapter(this, temp,gridsize));
      gridView.invalidateViews();

它有效,但我收到以下错误:(它不会崩溃)

10-22 18:12:39.719: E/ActivityThread(716): Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cee170 that was 
 originally bound here
 10-22 18:12:39.719: E/ActivityThread(716): android.app.ServiceConnectionLeaked: Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cee170 that was originally bound here
4

1 回答 1

2

我假设您的应用不是 com.android.exchange,那么您不必担心。原因是因为您使用的是模拟器,而 logcat 也在打印来自 com.android.exchange 的错误。帖子已讨论禁用此功能。

如果这是在真实设备上。请发布设备详细信息。

于 2013-10-22T18:19:11.397 回答