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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:26:37+00:00 2026-06-03T13:26:37+00:00

i get the error login cannot be resolved or is not a field error

  • 0

i get the error login cannot be resolved or is not a field error and same for passwd and ip.
i get this error in eclipse while doing android program.

  public void onClick(View v) {
    if (v == this.viewcam)
      {
        Log.i("login", this.login.getText().toString());
        Log.i("Passwd", this.passwd.getText().toString());
        Intent localIntent1 = new Intent(v.getContext(), MjpegSample.class);
        Log.i("My ip", this.editTextIp.getText().toString());
        localIntent1.putExtra("ip", "http://" + this.editTextIp.getText().toString() + "/");
        localIntent1.putExtra("user", this.login.getText().toString());
        localIntent1.putExtra("passwd", this.passwd.getText().toString());
        startActivityForResult(localIntent1, 1000);
      }
    }
});

the following is the main.xml file corresponding to above

<?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="vertical" >
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical" >
    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="IP CAM VIEWER"
        android:textAppearance="?android:attr/textAppearanceLarge"
        />
</LinearLayout>
<TableLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content" >
    <TableRow
        android:id="@+id/tableRow1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
        <TextView
            android:id="@+id/textView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Username : "
            android:textAppearance="?android:attr/textAppearanceLarge" />
        <EditText
            android:id="@+id/username"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ems="10" >
            <requestFocus />
        </EditText>
    </TableRow>
    <TableRow
        android:id="@+id/tableRow2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
        <TextView
            android:id="@+id/textView3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Password : "
            android:textAppearance="?android:attr/textAppearanceLarge" />
        <EditText
            android:id="@+id/password"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ems="10"
            android:inputType="textPassword" />
    </TableRow>
    <TableRow
        android:id="@+id/tableRow3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" >
        <TextView
            android:id="@+id/textView4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="IP : "
            android:textAppearance="?android:attr/textAppearanceLarge" />
        <EditText
            android:id="@+id/ip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ems="10" />
</TableLayout>
<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_weight="0.62" >
    <Button
        android:id="@+id/viewcam"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:layout_marginRight="96dp"
        android:layout_marginTop="16dp"
        android:text="View cam" />
</RelativeLayout>
</LinearLayout>
  • 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-03T13:26:41+00:00Added an answer on June 3, 2026 at 1:26 pm

    I assume this code is in an OnClickListener, in this case, remove the this keyword, as it refers to the OnClickListener instance, and not the Activity instance:

     public void onClick(View v) {
        if (v == viewcam)
          {
            Log.i("login", login.getText().toString());
            Log.i("Passwd", passwd.getText().toString());
            Intent localIntent1 = new Intent(v.getContext(), MjpegSample.class);
            Log.i("My ip", editTextIp.getText().toString());
            localIntent1.putExtra("ip", "http://" + editTextIp.getText().toString() + "/");
            localIntent1.putExtra("user", login.getText().toString());
            localIntent1.putExtra("passwd", passwd.getText().toString());
            startActivityForResult(localIntent1, 1000);
          }
        }
    

    Another option is to “fully qualify” this, for example:

    Log.i("login", TheActivity.this.login.getText().toString());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why I get error with this query on my live server but not on
Quite not sure why I see this error. I navigate to my Login View
whenever i try to login or signup on my page i get this error:
I have this query and I get error Operand should contain 1 column(s), whats
I use the following jquery statements but i get error in this function onGetDataSuccess(result)
I have been fighting with this error for a while. The error is somewhere
The complete error I am getting is this: Model compatibility cannot be checked because
I get an error in my code: Cannot find table 0. what am I
I'm making a login and I get an error with counting the number of
I get the below error in the line this.viewcam.setOnClickListerner(new view.OnClickListerner()) . I get this

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.