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

  • Home
  • SEARCH
  • 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 9217143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:34:35+00:00 2026-06-18T02:34:35+00:00

In my project I have created a global header layout global_header.xml and I use

  • 0

In my project I have created a global header layout global_header.xml and I use it in all of my layout XML files by using <include layout="@layout/global_header.xml">.

I have used this method before, and I am currently using it in this project. My problem is that I have a layout with the following contents:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#FFFFFFFF" >

    <include layout="@layout/global_header" />

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@id/global_header">

        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >
        </RelativeLayout>
    </ScrollView>

</RelativeLayout>

Contents of global_header.xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/global_header"
    android:layout_width="fill_parent"
    android:layout_height="60sp"
    android:layout_alignParentTop="true"
    android:background="#FFDDDDDD" >

    <ImageView
        android:id="@+id/global_header_logo"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="5sp"
        android:layout_marginTop="5sp"
        android:adjustViewBounds="true"
        android:src="@drawable/header" />

    <View
        android:layout_width="fill_parent"
        android:layout_height="1sp"
        android:layout_alignParentBottom="true"
        android:background="#FF000000" />

</RelativeLayout>

And I am getting an error on android:layout_below="@global/header" saying that:

error: Error: No resource found that matches the given name (at ‘layout_below’ with value ‘@global/header’).

I have used the include in other layouts in the project and it works without a problem, but for whatever reason, this layout file will not load the ID from the header where as all other layouts do.

The project will not build with this error even though I am sure that once running on the device it will find it not a problem, has anyone else had this problem? Is there solution/workaround?

Any and all help is greatly appreciated.

  • 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-18T02:34:36+00:00Added an answer on June 18, 2026 at 2:34 am

    Try this, specify id for include layout and use

     <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#FFFFFFFF" >
    
    <include layout="@layout/global_header"  android:id="@+id/header"/>
    
    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@id/header">
    
        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" >
        </RelativeLayout>
    </ScrollView>
    

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

Sidebar

Related Questions

I have created a servicestack MVC project, this I use as the main API
I am using Resharper for my C# project. I have created some private global
i have created a java project in eclipse,in this project i have an html
I have created SSRS project in BIDS and I want to use the reports
I have created SQL Server 2008 Database project using visual studio 2010. after build
I have created a maven project in eclipse using the maven2eclipse plugin. I then
I am using VS 2008. I have created a new Asp.net web site project
I have created an android Flex project using Flash Builder 4.6. Initially the root
In the past I have developed document workflows using SharePoint Designer and created 'Global
I have created a .dll project and I want to add it to Global

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.