1 / 10

Copying the layout XML and kotlin files into a Hello World Project

Learn how to copy the layout XML and Kotlin files into a Hello World project, ensuring that everything is set up correctly for running the program. This step-by-step guide will help you avoid errors and save time.

kylesmith
Download Presentation

Copying the layout XML and kotlin files into a Hello World Project

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Copying the layout XML and kotlin files into a Hello World Project

  2. File/New/New Project

  3. Select Empty Activity and click Next

  4. Enter a Name and click Finish

  5. Within the new project navigate to the MainActivity.kt file and open the .kt file provided in a text editor such as Notepad++

  6. Be careful of the “packages.” Copy everything but the packages and paste into the project

  7. Next navigate to the res/layout/activity_main.xml in the project and open the XML provided in a text editor

  8. Copy the contents over.

  9. Seeing red • Look for any errors that might have been caused in the copying. • Look in the .kt file • Look in the .xml file • If there are no errors you should be able to run the program

  10. The whole project is large and cumbersome, but copying and pasting from the essential files is an easy way to pass around the essentials

More Related