Adding internet permission to Android Project

If your application requires internet connection then you need to add permissions to the manifest file AndroidManifest.xml. If you don't do this then your app may crash throwing an exception.

Steps to Add Internet Permissions to Manifest file

Locate your AndroidManifest.xml file in your project folder,


Now you can see tabs at the lower side of the Manifest, click on Permissions,

Select Permissions.png
Select Permissions.png

Now click on "Add" to add a new element to manifest file.

Select User Permission,
Select Users Permission.png
Select Users Permission.png

Now you would see Name filed, select: android.permission.INTERNET, You can leave the Max SDK version as blank, but you can set a max API level as say 5.

Add android_permission_INTERNET.png
Add android_permission_INTERNET.png
Now if you see the XML view, you would see, <uses-permission android:name="android.permission.INTERNET" /> being added below user-sdk tag.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
    android:versionName="1.0" >

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

        android:theme="@style/AppTheme" >
            android:label="@string/app_name" >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />

Try Out Code2care Dev Tools:


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.