{"id":81424,"date":"2021-07-01T09:00:23","date_gmt":"2021-07-01T03:30:23","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=81424"},"modified":"2021-07-01T09:00:23","modified_gmt":"2021-07-01T03:30:23","slug":"hello-world-in-android","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/","title":{"rendered":"Hello World Program in Android"},"content":{"rendered":"<p>So hope your journey with android is going well, and till now, you understood many concepts. In this article, you will learn step by step how to create your first android application. You will get to know how to test your apps on your device and an emulator.<\/p>\n<h3>Steps to Create a Project in Android Studio<\/h3>\n<h4>Step 1: Opening Android Studio<\/h4>\n<p>If you are on windows, click on the search bar and type \u201cAndroid Studio.\u201d<\/p>\n<p>If you are on Linux, click \u201cShow Applications,\u201d located at the bottom left corner and search android studio and open it.<\/p>\n<h4>Step 2: Creating a new Project<\/h4>\n<p>On the screen, click on \u201c+ Create a New Project.\u201d<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81575\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project1.png\" alt=\"Create Project in Android\" width=\"1852\" height=\"1048\" \/><\/a><\/p>\n<h4>Step 3: Selecting Activity from New Project Tab.<\/h4>\n<p>You can see a variety of available activities in front of you. You need to select \u201cEmpty Activity\u201d and proceed. There are options even to create apps for Wear OS and Android TV.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81576\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project2.png\" alt=\"Android Activity\" width=\"1852\" height=\"1048\" \/><\/a><\/p>\n<h4>Step 4: Configuring your Activity<\/h4>\n<p>You would be available with several options, as shown below. You need to provide these details to create your empty activity. Let\u2019s see each field.<\/p>\n<h5>Name &#8211;<\/h5>\n<p>You need to provide your application name here. In our case, it is \u201cTechVidvan HelloWorld.\u201d You can provide space in between the words.<\/p>\n<h5>Package Name:<\/h5>\n<p>If you are working for an organization, you can keep the company domain as a package name. Otherwise, you can proceed with the default form, which \u201ccom.example.your_app_name\u201d.<\/p>\n<h5>Save Location:<\/h5>\n<p>You can select your location wherever you want to save this project.<\/p>\n<h5>Language:<\/h5>\n<p>Select Kotlin.<\/p>\n<h5>Minimum SDK:<\/h5>\n<p>Select API 22, which Android Lolipop. You are advised to use an android version that covers more than 90% of the users.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81577\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project3.png\" alt=\"Android API\" width=\"1848\" height=\"1048\" \/><\/a><\/p>\n<h4>Step 5:<\/h4>\n<p>Wait for the project to build and the files to load. After the files have loaded, the screen would appear something like below:<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81578\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project4.png\" alt=\"Android Project\" width=\"1848\" height=\"1052\" \/><\/a><\/p>\n<h4>Step 6:Project Structure<\/h4>\n<p>On the left side, you can find the project structure. Using the project structure, you can navigate through the project files.<\/p>\n<h4>Step 7: Android Manifest File<\/h4>\n<p>On the left side, click on the manifest file, and it will load the AndroidManifest.xml file for you. (App &#8212;&gt; Manifest &#8212;&gt; AndroidManifest.xml)<\/p>\n<p>Manifest describes the various components of Android like Activity, Services, etc. It also contains the app name and app logo and allows you to declare permissions.<\/p>\n<p>&nbsp;<\/p>\n<h4>Step 8: Gradle Scripts<\/h4>\n<p>You can locate the Gradle files on the left-side navigation.<\/p>\n<p>App&#8212;&gt; Gradle Scripts &#8212;&gt; build.gradle<\/p>\n<p>We mainly deal with two types of Gradle files. One is the project level Gradle file and the other being the app level Gradle files. These Gradle files actually contain the dependencies of the various libraries.<\/p>\n<h4>App Level Gradle File:<\/h4>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81580\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project6.png\" alt=\"Android App Gradle File\" width=\"1848\" height=\"1048\" \/><\/a><\/p>\n<h4>Project Level Gradle File:<\/h4>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81579\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project7.png\" alt=\"Android Gradle File\" width=\"1848\" height=\"1048\" \/><\/a><\/p>\n<h4>Step 9: XML Layout Files<\/h4>\n<p>We use XML to design the user interface or the layout of the various activities or fragments.<br \/>\nGo to res &#8212;&gt; Layout &#8212;&gt; activity_main.xml<\/p>\n<p>You can see the design window. Here you can drag and drop elements.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81582\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project8.png\" alt=\"Android XML Layout Files\" width=\"1852\" height=\"1048\" \/><\/a><\/p>\n<p>Click on the Code option to get the chance to code the layout. Now, this completes the steps to create a project in Android.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81581\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create_Project9.png\" alt=\"Android Project\" width=\"1848\" height=\"1044\" \/><\/a><\/p>\n<p>Now let\u2019s see how you can connect your device to your android studio.<\/p>\n<h3>Steps to Connect your Device to Android Studio<\/h3>\n<p>To connect your device to Android Studio, you need to enable USB Debugging on your device. Follow the steps to do that.<\/p>\n<h4>Step 1:<\/h4>\n<p>Open your device Settings<\/p>\n<h4>Step 2:<\/h4>\n<p>Click on About Phone<\/p>\n<h4>Step 3:<\/h4>\n<p>Click on Build options 2-3 times.<\/p>\n<h4>Step 4:<\/h4>\n<p>You will get a Toast that \u201cYou are now a Developer.\u201d<\/p>\n<h4>Step 5:<\/h4>\n<p>Now locate developer options in your settings and then enable USB Debugging.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/image22-1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81599\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/image22-1.jpg\" alt=\"First Android Program\" width=\"947\" height=\"1999\" \/><\/a><\/p>\n<h4>Step 6:<\/h4>\n<p>Now connect your device with a USB cable<\/p>\n<h4>Step 7:<\/h4>\n<p>You can see your phone detected at the top bar.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Device_connect.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81583\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Device_connect.png\" alt=\"Android Device Connect\" width=\"1848\" height=\"1048\" \/><\/a><\/p>\n<h3>Steps to Install Emulator in Android Studio<\/h3>\n<p>It doesn\u2019t matter whether you have an Android device or not. Android studio provides you a feature to create your own Android Emulator. The emulator works similar to an Android Device and can support all types of Android Applications.<\/p>\n<p>Let\u2019s see how to set up our own android emulator.<\/p>\n<h4>Step 1:<\/h4>\n<p>First open AVD Manager from the top menu bar. It will look like below.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81584\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install1.png\" alt=\"Android emulator install\" width=\"1848\" height=\"1048\" \/><\/a><\/p>\n<h4>Step 2:<\/h4>\n<p>Now click on \u201c+ Create Virtual Device.\u201d<\/p>\n<h4>Step 3:<\/h4>\n<p>Select Category as Phone and Select Pixel 2 or any of your desired models. Click on Next.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81586\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install2.png\" alt=\"emulator install in Android\" width=\"1848\" height=\"1040\" \/><\/a><\/p>\n<h4>Step 4:<\/h4>\n<p>Now,\u201d you need to select the Android version you wish to install. When the article is written, the latest version is Android R. Hence we will go with it.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81587\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install3.png\" alt=\"Install Android Emulator\" width=\"1848\" height=\"1048\" \/><\/a><\/p>\n<p>Just click on Download and proceed.<\/p>\n<h4>Step 5:<\/h4>\n<p>You can notice a window opened named \u201cComponent Installer.\u201d It will download the android tools, components and install them on your virtual device.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81588\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install4.png\" alt=\"Android Emulator\" width=\"1844\" height=\"1044\" \/><\/a><\/p>\n<h4>Step 6:<\/h4>\n<p>After the installation is done, the package click on Finish.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81589\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install5.png\" alt=\"emulator installation\" width=\"1852\" height=\"1052\" \/><\/a><\/p>\n<h4>Step 7: Virtual Device Configuration<\/h4>\n<p>You need to now select your downloaded system image(which is android R) and proceed.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81590\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install6.png\" alt=\"Android Emulator Installation\" width=\"1848\" height=\"1048\" \/><\/a><\/p>\n<h4>Step 8:<\/h4>\n<p>Give your virtual device a name and click on the finish\u2014no need to change other settings for now.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81592\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install7.png\" alt=\"Android Emulator Install\" width=\"1852\" height=\"1048\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h4>Step 9:<\/h4>\n<p>Now your emulator is successfully installed. To test your emulator, install just press on the run button present in actions.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81591\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install8.png\" alt=\"Android Emulator Installation\" width=\"1848\" height=\"1044\" \/><\/a><\/p>\n<p>So, below is how your android emulator would look like.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81593\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/emulator_install9.png\" alt=\"Android Hello World\" width=\"1844\" height=\"1044\" \/><\/a><\/p>\n<h3>Creating a Hello World Program in Android<\/h3>\n<h4>Step 1:<\/h4>\n<p>Now, as we have already set up our project, move on to activity_main.xml.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Hello_World_code1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81594\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Hello_World_code1.png\" alt=\"Android Activity Class\" width=\"1852\" height=\"1048\" \/><\/a><\/p>\n<h4>Step 2:<\/h4>\n<p>You can see by default a text view created containing the text \u201cHello World.\u201d<\/p>\n<p>Just scroll below, and you can locate an attribute named android: name = \u201cHello World.\u201d<\/p>\n<p>Change this with your desired text.<\/p>\n<p><strong>(Code: activity_main.xml)<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\n    xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\n    xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".MainActivity\"&gt;\n\n    &lt;TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Hello World! From TechVidvan\"\n        app:layout_constraintBottom_toBottomOf=\"parent\"\n        app:layout_constraintLeft_toLeftOf=\"parent\"\n        app:layout_constraintRight_toRightOf=\"parent\"\n        app:layout_constraintTop_toTopOf=\"parent\" \/&gt;\n\n&lt;\/androidx.constraintlayout.widget.ConstraintLayout&gt;\n<\/pre>\n<h4>Step 3:<\/h4>\n<p>After this, all, come back to your MainActivity.kt. This activity is the first screen visible to the user and using this screen, the user can interact.<\/p>\n<p>Just make sure that your MainActivity is bound with your activity_main.xml layout.Your MainActivity.kt file should look like below:<\/p>\n<p><strong>(Code: MainActivity.kt)<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.example.techvidvanhelloworld\n\nimport androidx.appcompat.app.AppCompatActivity\nimport android.os.Bundle\n\nclass MainActivity : AppCompatActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n    }\n}\n<\/pre>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Hello_World_code2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81595\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Hello_World_code2.png\" alt=\"Android Hello World\" width=\"1848\" height=\"1048\" \/><\/a><\/p>\n<p>After you are done with these then now you are ready to test your app.<\/p>\n<h3>Testing your Application both on Android and Emulator<\/h3>\n<p>You can either select your android device or emulator from the top menu bar. After you have chosen your desired device, just go ahead to press the run button. It will install the application on your device.<\/p>\n<p>For your device, your application will appear as follows:<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Output1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81596\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Output1.png\" alt=\"Android Hello World\" width=\"1080\" height=\"2280\" \/><\/a><\/p>\n<p>In your emulator, the application would appear as follows:<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/image1-21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81598\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/image1-21.png\" alt=\"Android hello World\" width=\"624\" height=\"936\" \/><\/a><\/p>\n<p>If, by chance, you face any errors while installing or building the project. Then you can locate those errors in the log located in the bottom left corner of your android studio.<\/p>\n<h3>Summary<\/h3>\n<p>So through this article, you got to know how you can build your first android application. You understood how to create a project in android studio and set up your virtual device(or emulator) on android studio. Lastly, you saw how you could test your applications both on your device and on an emulator.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So hope your journey with android is going well, and till now, you understood many concepts. In this article, you will learn step by step how to create your first android application. You will&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":81573,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2791],"tags":[3657,3658,3659],"class_list":["post-81424","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-hello-world-example-in-android","tag-hello-world-in-android","tag-hello-world-program-in-android"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hello World Program in Android - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn step by step procedure how to create your first android Hello World Program and how to test your apps on your device and emulator.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hello World Program in Android - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn step by step procedure how to create your first android Hello World Program and how to test your apps on your device and emulator.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-01T03:30:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Hello_World_Program.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hello World Program in Android - TechVidvan","description":"Learn step by step procedure how to create your first android Hello World Program and how to test your apps on your device and emulator.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/","og_locale":"en_US","og_type":"article","og_title":"Hello World Program in Android - TechVidvan","og_description":"Learn step by step procedure how to create your first android Hello World Program and how to test your apps on your device and emulator.","og_url":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-07-01T03:30:23+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Hello_World_Program.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Hello World Program in Android","datePublished":"2021-07-01T03:30:23+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/"},"wordCount":1146,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Hello_World_Program.jpg","keywords":["Hello World Example in Android","Hello World in Android","Hello World Program in Android"],"articleSection":["Android Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/","url":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/","name":"Hello World Program in Android - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Hello_World_Program.jpg","datePublished":"2021-07-01T03:30:23+00:00","description":"Learn step by step procedure how to create your first android Hello World Program and how to test your apps on your device and emulator.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Hello_World_Program.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Hello_World_Program.jpg","width":1200,"height":628,"caption":"Android Hello World Program"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/hello-world-in-android\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Hello World Program in Android"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/81424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=81424"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/81424\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/81573"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=81424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=81424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=81424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}