udacity / ud851-Sunshine

Apache License 2.0
2k stars 4.51k forks source link

S2.02-Networking Exercise Solution- inputstream not working #217

Open yaad96 opened 4 years ago

yaad96 commented 4 years ago

even from the solution code, try { Log.d("MAIN_ACTIVITY_INSIDETRY", "0"); InputStream in = urlConnection.getInputStream();

        Log.d("MAIN_ACTIVITY_INSIDETRY", "1");

---------------------------------// The second debug information is not even getting logged. There is some issue with InputStream i guess. did anyone solve it?

The same problem persists throughtout the next solutions too.... even in the final solution if i run it it show an error has occured please refresh.....
jafewe commented 3 years ago

Hi, I have the same problem. Simply uninstall the app on the emulator and install it again.

I guess that the added permission is not automatically recognized. Maybe it also helps to increase the versionName and versionCode in app / build.gradle, but I haven't tried that.