سلام
خطای دریافتی من اینه :
com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "expertdevelopers.ir": No address associated with hostname
public class MainActivity extends AppCompatActivity { public static final String MY_URL = "https://expertdevelopers.ir/api/v1/experts/student"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); StringRequest stringRequest = new StringRequest(Request.Method.GET, MY_URL, new Response.Listener<String>() { @Override public void onResponse(String response) { Log.i("MY main ", "onResponse: "); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.i("My main", "onErrorResponse: "+ error); } }); RequestQueue requestQueue = Volley.newRequestQueue(this) ; requestQueue.add(stringRequest); }
مانیفست :
<uses-permission android:name="android.permission.INTERNET"> </uses-permission> <application android:usesCleartextTraffic="true"