Android: ShareActionProvider with no history
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: According to the Android documentation if I don't want my ShareActionProvider to persist the share history I should call mShareActionProvider.setShareHistoryFileName(null) However when I do this I get the following crash on selecting a share option: 11-15 10:06:34.848: E/AndroidRuntime(22461): java.lang.IllegalStateException: No preceding call to #readHistoricalData 11-15 10:06:34.848: E/AndroidRuntime(22461): at android.widget.ActivityChooserModel.persistHistoricalDataIfNeeded(ActivityChooserModel.java:573) 11-15 10:06:34.848: E