unreachable statement after using .getActivity( ) in a Fragment

后端 未结 2 1349
花落未央
花落未央 2021-01-03 08:03

I want to use .getSystemService in a Fragment. When i use .getActivity() to get the context of my activity, Android Studio tells me in the same line that this is a \"unreach

2条回答
  •  一整个雨季
    2021-01-03 08:44

    You have a return statement as the first line in your method, right above the line that has your comment //GPS SIGNAL...

    Anything after a return statement is of course unreachable code.

提交回复
热议问题