Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8242983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:21:15+00:00 2026-06-07T21:21:15+00:00

So I started diving into the Android world and was trying to follow the

  • 0

So I started diving into the Android world and was trying to follow the official getting started guide from here: building-ui. The tutorial seems simple enough, but I’m running into issues where the things don’t quite match up.

For example:

  1. In the tutorial, they say there’s a layout/main.xml file that’s created by default. I don’t get this file and instead, I get layout/my_first_activity.xml. The contents of these files are different as well.

Why is this? What am I doing wrong? Is the documentation old? (I’m using Eclipse Juno, and use Android 2.3 SDK). I try to format (copy the code from the tutorals) exactly but when I try to run the app I get errors.

—

Tutorial says main.xml file is like this:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >
</LinearLayout>
.
.
.

My my_first_activity.xml looks like this:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:padding="@dimen/padding_medium"
        android:text="@string/hello_world"
        tools:context=".MyFirstActivity" />

</RelativeLayout>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:21:16+00:00Added an answer on June 7, 2026 at 9:21 pm

    Yeah, the documentation is a little old. You’ve got it right; they’re the same file, with different names. You can safely rename it to main.xml if it makes you feel better.

    You’ve picked the setting that creates a “hello world” text view by default, so it went ahead and created that TextView for you.

    If you want, you can replace the RelativeLayout with LinearLayout to follow the tutorial. I don’t think the part works in the new ADT.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just recently started diving into Real World Haskell and the book provides some
I just started diving into the world of Rails by reading the well known
I have recently started diving into Haskell. Its quite interesting, but the definition of
I've just started diving in to the crazy world that is perl and have
Started making a game. Here's some of my code. package games.tribe.screens; import games.tribe.model.World; import
I just started diving into Metro Style application development and I realized that there
I've just started diving into Node.js after several years of PHP programming and I
I just started diving into vi and so far learned only basic moving around/editing
I've just started using rails, and decided to follow the Ruby on Rails Tutorial
I'm just getting started with eclipse and android development. One thing which is driving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.