[Solved] httpResponse = httpClient.execute(httpGet);


From the code you have posted and related imports in the same, depending on the O.S(Esp Honeycomb and onwards), your application would crash due to the NetworkOnMainThreadException. You are attempting the network operation on the main thread, not in a background thread or Asyctask.

In your logcat(if you post that it’l help), NetworkOnMainThreadException will be thrown:

E/AndroidRuntime(673): java.lang.RuntimeException: Unable to start activity
    ComponentInfo{com.example/com.example.ExampleActivity}: android.os.NetworkOnMainThreadException

The explanation as to why this occurs is well documented on the Android developer’s site:

A NetworkOnMainThreadException is thrown when an application
attempts to perform a networking operation on its main thread. This is
only thrown for applications targeting the Honeycomb SDK or higher.
Applications targeting earlier SDK versions are allowed to do
networking on their main event loop threads, but it’s heavily
discouraged.

Go through:

Why the app would crash or work depending on O.S.

Try AsyncTask to avoid NetworkOnMainThread

Why should you not use the Strict Mode alternative as your solution and only to debug(i’d suggest avoid that also actually, you know what is the problem now):
Critical to fix it, not by setting Thread policies

solved httpResponse = httpClient.execute(httpGet);