google-developer-training / android-basics-kotlin-mars-photos-app

Apache License 2.0
91 stars 193 forks source link

Android Basics: Get data from the Internet #137

Closed idongesit98 closed 8 months ago

idongesit98 commented 2 years ago

name: Android Basics Unit 4 issue about: Report problems with the Android Basics Unit 4 codelabs title: 'Android Basics Unit 4 issue:' labels: '' assignees: ''


URL of codelab

In which task and step of the codelab can this issue be found? Connecting to the internet

Describe the problem it was showing internet permission denied debugger internet

Steps to reproduce?

  1. Go to...
  2. Click on...
  3. See error...

Versions Android Studio version: API version of the emulator:

Additional information Include screenshots if they would be useful in clarifying the problem. andoid manifest debugger internet debugger internet

xhbear commented 2 years ago

You may have overlooked the setup process, go to your AndroidManifest file and add below permission.

<uses-permission android:name="android.permission.INTERNET"/>

Put above code withint the body:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.android.marsphotos">

    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        ...
    </application>

</manifest>

This is necessary when writing a program that needs access to the web. Hope this helps!

osuleymanova commented 2 years ago

@idongesit98 Thank you for reaching out to us. Please let us know if you still face the same issue.