2 Replies - 2184 Views - Last Post: 28 March 2012 - 03:54 PM

#1 guus123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 28-March 12

some error's in an andoid app

Posted 28 March 2012 - 10:00 AM

I've had buy a book that's called "how to make a android app for dummies"
Now are in the codes some error's

The error's are in the .xml file

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/main_layout"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="10dp"
    />
    <LinearLayout                                <------------------- Here = error
       
        android:id="@+id/mainsub_layout"
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:paddingtop="20dp" >
        
   <textview
        android:id="@+id/welcome_title"
   		android:layout_width="fill_parent"
   		android:layout_height="wrap_content"
   		android:gravity="center"
   		android:textsize="20dp"
   		android:textstyle="bold"
   		android:text="@string/welcome_title"
   		/>
   <RelativeLayout
       android:id="@+id/button_layout"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       >
       <Button
           android:id="@+id/search_button"
           android:layout_width="fill_parrent"
           android:layout_height="wrap_content"
           android:"@string/search_button"
           />
       <Button
           android:id="@+id/new_button"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:layout_below="@+id/search_button"
           android:layout_alighleft="@+id/search_button"
           android:text="@string/new_button"
           />
       <Button
           android:id="@+id/help_button"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:layout_below="@+id/new_button"
           android:layout_alighleft="@+id/new_button"
           android:text="@string/help_button"
           />
        <Button
           android:id="@+id/exit_button"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:layout_below="@+id/help button"
           android:layout_alighleft="@+id/help_button"
           android:text="@string/exit_button"
           />    
    </RelativeLayout>
    </LinearLayout>      
    </LinearLayout>



Errors are
1. No resource found that matches the given name (at 'label' with value '@string/app_name
2. Syntax error on token "invalid Character" ;expected
3. The markup in the document following the root element must be well-formed.
4. Warnings ( 1 item)

Sorry if it's a stupid question
I am a beginner who is not yet know much about

Is This A Good Question/Topic? 0
  • +

Replies To: some error's in an andoid app

#2 DonalDuck  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 5
  • Joined: 28-March 12

Re: some error's in an andoid app

Posted 28 March 2012 - 03:47 PM

Hi!
About the error on line 9, you:
<LinearLayout
something
>

something

</LinearLayout>


You don't actually close it (for example,
<LinearLayout things about LinearLayout />
), unless you don't want it to apply to anything.
That means that LinearLayout will always apply until to other things (texts, buttons, wathever) until you close (
</LinearLayout>
). You write
</LinearLayout>
and not
/>
, that the device understands what you are closing.

I hope I've been helpful,
DD
Was This Post Helpful? 1
  • +
  • -

#3 DonalDuck  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 5
  • Joined: 28-March 12

Re: some error's in an andoid app

Posted 28 March 2012 - 03:54 PM

I can't get how to edit my post... and I forgot to tell you :
<LinearLayout
something concerning LinearLayout (background, for example)
>

something about, for example buttons, TextViews, etc.

</LinearLayout>



Sorry about another post,
DD
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1