在android开发中,写了一个关于继承Fragment的类时,如果有重载构造函数时,会提示“Avoid non-default constructors in fragments: use a default constructor plus Fragment#setArguments(Bundle) instead”的错误,

这时。在类的前面加上@SuppressLint("ValidFragment")即可。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
  • 2022-01-24
  • 2021-05-06
相关资源
相似解决方案