In case anyone had this problem I found the solution. It was simply a proxy problem and missing library problem.

 1. add the rxJava ,okio and Okhttp jar lib.
 
 2. This step is optional if u have a proxy problem like i did.

        String hostname = "IP ADDRESS";
		int port = PORT;

		Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(hostname, port));
		OkHttpClient client = new OkHttpClient.Builder().proxy(proxy).build();

		String url = "https://rinkeby.infura.io/v3/<API-KEY>";

		web3 = Web3j.build(new HttpService(url, client, true));