0
public static List<GasType> getGasTypeList() {
    RequestQueue queue = Volley.newRequestQueue(this);
}

this can not be referenced from a static context

I tried everything I know but still no result.

aled
  • 21,330
  • 3
  • 27
  • 34
  • Remove the `static` keyword. You cannot access `this` when your function is static. – marstran Apr 28 '23 at 12:57
  • 1
    Note that JavaScript and Java aren't related, so have removed the tag for the former. – ndc85430 Apr 28 '23 at 13:16
  • Does this answer your question? [Why can't we use 'this' keyword in a static method](https://stackoverflow.com/questions/11664522/why-cant-we-use-this-keyword-in-a-static-method) – alea Apr 28 '23 at 13:25

0 Answers0