Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change http links to https-- Android error #30

Closed
RyanDurk opened this issue Jul 15, 2018 · 3 comments
Closed

Change http links to https-- Android error #30

RyanDurk opened this issue Jul 15, 2018 · 3 comments

Comments

@RyanDurk
Copy link

In MainActivity.kt, starting with Chapter 8, the http link gives me this error in MainActivity->onCreate:

weatherapp W/System.err: java.io.IOException: Cleartext HTTP traffic to api.openweathermap.org not permitted

I propose changing the http://api.openweather... URL to https://api.openweather...

@SVNicolaeDaniel
Copy link

if not, please update manifest.

<manifest ...>

<application
...
android:usesCleartextTraffic="true"
...>
...

@cking24343
Copy link

According to Network security configuration: "Starting with Android 9.0 (API level 28), cleartext support is disabled by default."

@SVNicolaeDaniel suggestion works. Can also look at the following for more options: https://stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted

@Mostafayehya
Copy link

In MainActivity.kt, starting with Chapter 8, the http link gives me this error in MainActivity->onCreate:

weatherapp W/System.err: java.io.IOException: Cleartext HTTP traffic to api.openweathermap.org not permitted

I propose changing the http://api.openweather... URL to https://api.openweather...

this solved the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants