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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:08:02+00:00 2026-06-13T23:08:02+00:00

I got the following runtime error. can you guys help me to correct the

  • 0

I got the following runtime error. can you guys help me to correct the error?
here is the log cat.

11-06 14:28:06.262: E/AndroidRuntime(398): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxxx.xxx/com.xxxx.xxx..Page1SubActivity}: android.view.InflateException: Binary XML file line #76: Error inflating class <unknown>
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.os.Looper.loop(Looper.java:123)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.app.ActivityThread.main(ActivityThread.java:3683)
11-06 14:28:06.262: E/AndroidRuntime(398):  at java.lang.reflect.Method.invokeNative(Native Method)
11-06 14:28:06.262: E/AndroidRuntime(398):  at java.lang.reflect.Method.invoke(Method.java:507)
11-06 14:28:06.262: E/AndroidRuntime(398):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-06 14:28:06.262: E/AndroidRuntime(398):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-06 14:28:06.262: E/AndroidRuntime(398):  at dalvik.system.NativeStart.main(Native Method)
11-06 14:28:06.262: E/AndroidRuntime(398): Caused by: android.view.InflateException: Binary XML file line #76: Error inflating class <unknown>
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.view.LayoutInflater.createView(LayoutInflater.java:518)
11-06 14:28:06.262: E/AndroidRuntime(398):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
11-06 14:28:06.262: E/AndroidRuntime(398):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.app.Activity.setContentView(Activity.java:1657)
11-06 14:28:06.262: E/AndroidRuntime(398):  at com.xxxx.xxx.Page1SubActivity.onCreate(Page1SubActivity.java:30)
11-06 14:28:06.262: E/AndroidRuntime(398):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)

this is the Java file

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.TextView;

public class Page1SubActivity extends Activity {

    /** Called when the activity is first created. */

    private EditText edit1;
    private EditText edit2;
    private TextView textview;
    private TextView titleview ;
    private TextView tview1 ;
    private TextView tview2;
    private TextView tview3 ;


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // this activity is used for button 1 and button 4 in the main menu
        /*
         * String titles; String texts1; String texts2; String texts3;
         */

        setContentView(R.layout.page1sub);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        Intent intent = getIntent();
        int id = intent.getIntExtra("id", 0);

         titleview = (TextView) findViewById(R.id.textView1);
         tview1 = (TextView) findViewById(R.id.textView2);
         tview2 = (TextView) findViewById(R.id.textView3);
         tview3 = (TextView) findViewById(R.id.textView4);

        if (id == 1)// gold page
        {

            addTranslate(R.string.page1subgoldtitle, titleview);
            addTranslate(R.string.page1subgoldtext1, tview1);
            addTranslate(R.string.page1subgoldtext2, tview2);
            addTranslate(R.string.page1subgoldtext3, tview3);

            ImageButton rightbuton = (ImageButton) findViewById(R.id.rightbutton);
            ImageButton imb = (ImageButton) findViewById(R.id.back_arrow);
            imb.setOnClickListener(new OnClickListener() {

                public void onClick(View v) {
                    // if the user come through 1 st button he will be navigate
                    // page1activity with id =1
                    Intent intent = new Intent(Page1SubActivity.this,
                            Page1Activity.class);
                    intent.putExtra("id", 1);
                    startActivity(intent);

                }
            });

            rightbuton.setOnClickListener(new OnClickListener() {

                public void onClick(View v) {
                    // TODO Auto-generated method stub
                    edit1 = (EditText) findViewById(R.id.editText1);
                    edit2 = (EditText) findViewById(R.id.editText2);
                    textview = (TextView) findViewById(R.id.textView5);

                    Double number2 = Double.parseDouble(edit1.getText()
                            .toString());
                    Double number3 = Double.parseDouble(edit2.getText()
                            .toString());
                    number3 = number2 * number3;

                    int number2int = (int) (number2 * number3);
                    int number3int = (int) (number3 / 40);

                    number2 = number2 * number3;
                    number3 = number3 / 40;

                    if (number2int - number2 != 0) {
                        String number2val = Double.toString(number2);
                        textview.setText(number2val);

                    } else {
                        String number2val = Integer.toString(number2int);
                        textview.setText(number2val);
                        // label.text = [NSString stringWithFormat:@"%d",
                        // number2int];

                    }

                    if (number3int - number3 != 0) {
                        String number3val = Double.toString(number3);
                        textview.setText(number3val);

                    } else {

                        String number3val = Integer.toString(number3int);
                        textview.setText(number3val);

                    }

                }
            });

        } else if (id == 4)// silver
        {

            addTranslate(R.string.page1subsilvertitle, titleview);
            addTranslate(R.string.page1subsilvertext1, tview1);
            addTranslate(R.string.page1subsilvertext2, tview2);
            addTranslate(R.string.page1subsilvertext3, tview3);

            ImageButton imb = (ImageButton) findViewById(R.id.back_arrow);

            imb.setOnClickListener(new OnClickListener() {

                public void onClick(View v) {
                    // if the user come through 4th button he will be navigate
                    // page1activity with id =4
                    Intent intent = new Intent(Page1SubActivity.this,
                            Page1Activity.class);
                    intent.putExtra("id", 4);
                    startActivity(intent);

                }
            });

        }

    }

    private void addTranslate(int rid, TextView txt1) {
        String textv = getResources().getString(rid);
        txt1.setText(Farsi.Convert(textv));
    }

    public void onClickBtn(View v) {

        int butid = v.getId();
        switch (butid) {
        case R.id.leftbutton:
            edit1 = (EditText) findViewById(R.id.editText1);
            edit2 = (EditText) findViewById(R.id.editText2);

            edit1.setText("");
            edit2.setText("");
            textview.setText("");
            break;

        }

    }
}

This is the xmlfile.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/page1background"
    android:paddingRight="@dimen/padding_large" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:paddingTop="@dimen/padding_Xlarge"
        android:text="@string/text"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:textColor="@color/textbody" />

    <LinearLayout
        android:id="@+id/linearLayout2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:layout_centerVertical="true"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/textView2"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:text="@string/text"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="@color/textbody" />

        <EditText
            android:id="@+id/editText1"
            android:layout_width="262dp"
            android:layout_height="45dp"
            android:layout_gravity="center_horizontal"
            android:background="@drawable/textbg"
            android:inputType="numberDecimal"
            android:paddingLeft="@dimen/padding_small" >

            <requestFocus />
        </EditText>

        <TextView
            android:id="@+id/textView3"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:text="@string/text"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="@color/textbody" />

        <EditText
            android:id="@+id/editText2"
            android:layout_width="262dp"
            android:layout_height="45dp"
            android:layout_gravity="center_horizontal"
            android:background="@drawable/textbg"
            android:inputType="numberDecimal"
            android:paddingLeft="@dimen/padding_small" >
        </EditText>

        <TextView
            android:id="@+id/textView4"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:text="@string/text"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="@color/textbody" />


        <TextView
            android:id="@+id/textView5"
            android:layout_width="262dp"
            android:layout_height="45dp"
            android:layout_gravity="center_horizontal"
            android:background="@drawable/textbg"
            android:paddingLeft="@dimen/padding_small"
            android:paddingTop="@dimen/padding_small"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="?android:attr/editTextColor" />




        <LinearLayout
            android:id="@+id/linearLayout3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:orientation="horizontal" >

            <ImageButton
                android:id="@+id/leftbutton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="25dp"
                android:background="@drawable/leftbutton"
                android:contentDescription="@string/Description"
                android:onClick="onClickBtn" />

            <ImageButton
                android:id="@+id/rightbutton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@drawable/rightbutton"
                android:contentDescription="@string/Description"
                android:onClick="onClickBtn" />
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/linearLayout9"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:weightSum="10" >

        <View
            android:id="@+id/view10"
            android:layout_width="0dip"
            android:layout_height="10dp"
            android:layout_marginBottom="35dp"
            android:layout_weight="4.5" />

        <ImageButton
            android:id="@+id/back_arrow"
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_marginBottom="30dp"
            android:layout_weight="1"
            android:background="@drawable/backbut"
            android:contentDescription="@string/Description"
            android:onClick="onClickBtn"
            android:src="@drawable/backarrowpress" />

        <View
            android:id="@+id/view20"
            android:layout_width="0dip"
            android:layout_height="10dp"
            android:layout_marginBottom="35dp"
            android:layout_weight="4.5" />
    </LinearLayout>

</RelativeLayout>

I added the xml file and java file to the question. this one was working well. after I update the code I got the error.please help me to correct this.
thanks in advance..

  • 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-13T23:08:03+00:00Added an answer on June 13, 2026 at 11:08 pm

    when I remove the line android:textColor="?android:attr/editTextColor" in txtview5 it started to work as It was. However that problem is solved by removing this line. But I don’t have a cool feeling about that.

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

Sidebar

Related Questions

Following error I got in my application. I can't understand what is it and
I got following error... System.NullReferenceException: Object reference not set to an instance of an
When I type the rails server on terminal, I got the following error. I
I can't figure out what I'm missing in the following code. I've got a
I got the following exception: System.Workflow.Runtime.Hosting.PersistenceException: Type ‘Microsoft.SharePoint.SPWeb’ in Assembly ‘Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’
I have this on my .gitignore file: /nbproject/ /app/runtime/ /app/runtime/application.log* /app/runtime/error.log* /app/config/localdev.php* .DS_Store 1)
I've got following in my web.config: <compilation defaultLanguage=vb debug=false targetFramework=4.0/> <customErrors mode=On defaultRedirect=~/error.html/> It
I got following repeating syntax and I want to keep all <h1> that is
I got following code in an XHTML-document and every browser saysit is malformed :(
I got following code from net and it looks everything is proper but i'm

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.