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 8323393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:42:52+00:00 2026-06-08T23:42:52+00:00

How to detect the layout error ? if i start the eclipse and open

  • 0

How to detect the layout error ? if i start the eclipse and open the first Activity with layout. but the first Activity.java file is gave some error in the SetContentView(R.layout.main) .am using latest Sdk API 16.

package com.eConnect.Restaurant;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class LoginActivity extends Activity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
  }

  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
     getMenuInflater().inflate(R.menu.main, menu);
     return true;
  }
}

main.xml:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/LinearLayout1"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:background="#000000"
  android:orientation="vertical" >

  <ImageView
    android:id="@+id/imageView1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="15dip"
    android:contentDescription="@string/desc"
    android:src="@drawable/econnect_logo" />

<TextView
    android:id="@+id/textView1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="15dip"
    android:text="@string/uid"
    android:textAppearance="?android:attr/textAppearanceLarge" />

<EditText
    android:id="@+id/editText1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="15dip"
    android:background="#ffffff"
    android:hint="@string/uid"
    android:inputType="number"
    android:textColor="#9966cc" >

    <requestFocus />
</EditText>

<TextView
    android:id="@+id/textView2"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="15dip"
    android:text="@string/PW"
    android:textAppearance="?android:attr/textAppearanceLarge" />

<EditText
    android:id="@+id/editText2"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="15dip"
    android:background="#ffffff"
    android:hint="@string/PW"
    android:inputType="numberPassword"
    android:textColor="#9966cc" />

<TextView
    android:id="@+id/textView3"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="15dip"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textColor="#ff0000"
    android:textStyle="bold" />

<Button
    android:id="@+id/button1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="15dip"
    android:background="#cccccc"
    android:text="@string/bt"
    android:textColor="#006600"
    android:textStyle="bold" />

androidmanifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.eConnect.Restaurant"
  android:versionCode="1"
  android:versionName="1.0" >

  <uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

  <application
     android:icon="@drawable/ic_launcher"
     android:label="@string/app_name"
     android:theme="@style/AppTheme" >
     <activity
        android:name=".LoginActivity"
        android:label="@string/title_activity_login" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
  </application>

</manifest>
  • 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-08T23:42:54+00:00Added an answer on June 8, 2026 at 11:42 pm

    First clean your project.By using Project > Clean.Another thing you have to do is delete R.Java from list.Again clean the project.Try this one and let me know.

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

Sidebar

Related Questions

I am using this code to detect layout orientation changes but the following code
I am trying to detect groups which contain the difference between first age and
Is there any way to detect the current keyboard layout using JavaScript? I found
In my bootstrap, I detect the site the users on, then issue the layout
I am trying to import my ListView but for some reason my program cannot
I have a Rails 3.1 application with an usual file layout. Heroku detects it
It auto detect my current location when i run this app but there isn't
I have an activity with a layout contains an ImageView and TextView . ImageView
let me start by saying that due to the complicated design of the layout
Dianne Hackborn mentioned in a couple threads that you can detect when a layout

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.