AppWidgetHost crash android.os.TransactionTooLargeException

前端 未结 1 1072
北恋
北恋 2021-01-06 23:44

I\'m working on a custom android launcher. After I add some widgets (Samsung gallery, Favourite direct dial), every time I restart the app I obtain a crash. This is the code

相关标签:
1条回答
  • 2021-01-06 23:54

    See TransactionTooLargeException in the docs. If you look at the source for AppWidgetHost you will find this code mentioned in your trace:

    ArrayList<RemoteViews> updatedViews = new ArrayList<RemoteViews>();
    // ....
    updatedIds = sService.startListening(mCallbacks, mPackageName, mHostId, updatedViews);
    

    In this case the updatedViews is an array of RemoteViews. Those can be quite large if they contain a lot of images. Do you have some widgets with huge images in them or something?

    0 讨论(0)
提交回复
热议问题