title: Android Kotlin Volley String Request stopped working
body: <p>I'm trying to get simple GET request from my server in Android app. At first it worked, but after I tried to parse it and added some changes it stopped working, idk why. Here's my code before and after, I even rolled back all the refactor changes but it still didn't work. I just don't get any response, not even error. I checked even on Debug and tried to print it, didn't help. First time it worked with my ip+port, I didn't even needed to use port-forwarding, and this time I checked on my phone browser, it still works, I can get the answer in browser, but Kotlin code doen't work for some reason. Here's the first version (was working):</p>
  <pre><code>package com.example.tvseriesprojectapp
  
  import android.support.v7.app.AppCompatActivity
  import android.os.Bundle
  import android.support.constraint.ConstraintLayout
  import android.view.ViewGroup
  import android.widget.LinearLayout
  import android.widget.TextView
  import com.android.volley.Request
  import com.android.volley.Response
  import com.android.volley.toolbox.StringRequest
  import com.android.volley.toolbox.Volley
  
  class MainActivity : AppCompatActivity() {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
          val layout = findViewById&lt;ConstraintLayout&gt;(R.id.root)
  
          val textView = TextView(this)
          textView.layoutParams = ConstraintLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)
          val queue = Volley.newRequestQueue(this)
          val url = &quot;http://192.168.0.109:8080/tvshows&quot;
          val stringRequest = StringRequest(
              Request.Method.GET, url,
              Response.Listener&lt;String&gt; { response -&gt;
                  textView.text = &quot;Response is: ${response}&quot;
              },
              Response.ErrorListener { response -&gt; textView.text = &quot;${response.message}&quot; })
          queue.add(stringRequest)
          layout?.addView(textView)
      }
  }
  </code></pre>
  <p>Here's the second:</p>
  <pre><code>package com.example.tvseriesprojectapp
  
  import android.support.v7.app.AppCompatActivity
  import android.os.Bundle
  import android.support.constraint.ConstraintLayout
  import android.util.Log
  import android.view.ViewGroup
  import android.widget.LinearLayout
  import com.google.gson.Gson;
  import android.widget.TextView
  import com.android.volley.Request
  import com.android.volley.Response
  import com.android.volley.toolbox.StringRequest
  import com.android.volley.toolbox.Volley
  
  class MainActivity : AppCompatActivity() {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
          val layout = findViewById&lt;LinearLayout&gt;(R.id.root)
  
          var listOfShows: MutableList&lt;TvShow&gt; = mutableListOf();
          val url = &quot;http://192.168.0.109:8080/tvshows&quot;
          val queue = Volley.newRequestQueue(this)
          val textView = TextView(this)
          textView.layoutParams = LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)
          val gson = Gson();
          var err: String = &quot;&quot;;
          var resp: String = &quot;&quot;;
          val stringRequest = StringRequest(
              Request.Method.GET, url,
              Response.Listener&lt;String&gt; { response -&gt; 
                  textView.text = response },
              Response.ErrorListener { response -&gt; textView.text = &quot;${response.message}&quot; }
              )
          queue.add(stringRequest)
  //        mock
          val str: String = &quot;[{\&quot;id\&quot;:1,\&quot;name\&quot;:\&quot;Everybody hates Chris\&quot;,\&quot;category\&quot;:\&quot;comedy\&quot;,\&quot;year\&quot;:2005},{\&quot;id\&quot;:2,\&quot;name\&quot;:\&quot;Friends\&quot;,\&quot;category\&quot;:\&quot;comedy\&quot;,\&quot;year\&quot;:1994}]&quot;;
          listOfShows = gson.fromJson(str, Array&lt;TvShow&gt;::class.java).toMutableList()
  
          for (one in listOfShows) {
              val textView = TextView(this)
              textView.layoutParams = LinearLayout.LayoutParams(
                  ViewGroup.LayoutParams.WRAP_CONTENT,
                  ViewGroup.LayoutParams.WRAP_CONTENT
              )
              textView.text = &quot;Name: ${one.name} \n Category: ${one.category} \n Year: ${one.year}&quot;
              layout?.addView(textView)
          }
      }
  }
  </code></pre>
  <p>I tried just to print response, log it, try to make it to var resp and then show it, checked it on debug, nothing worked, what I get just &quot;&quot;.</p>