Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个安卓应用程序。出于某种原因,当意图的额外内容为空时,我希望我的应用程序不显示在选择器对话框中。实际上,null extra 会使我的应用程序崩溃。有什么方法可以在意图过滤器中指定此类信息?
非常感谢!
我想不是。检查 null 怎么办?
if( getIntent().getExtras() != null) { //your code }