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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:11:32+00:00 2026-06-16T00:11:32+00:00

To begin with, I followed this tutorial: http://www.codeproject.com/Articles/102065/Android-A-beginner-s-guide?fid=1583614&df=90&mpp=10&noise=1&prof=True&sort=Position&view=Expanded&spc=None&fr=11#xx0xx I have checked a good many

  • 0

To begin with, I followed this tutorial:

http://www.codeproject.com/Articles/102065/Android-A-beginner-s-guide?fid=1583614&df=90&mpp=10&noise=1&prof=True&sort=Position&view=Expanded&spc=None&fr=11#xx0xx

I have checked a good many of the similar posts here, but all of the solutions have been code specific and haven’t worked.

I am just starting out developing android apps, and found this tutorial. When I launch it though, the emulator gives me the this app has stopped message. There are no warnings from my code, so I don’t even know where to begin.

Here’s my code:
MainActivity.java

package com.example.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;


public class MainActivity extends Activity {

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

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.activity_main, menu);
    //return true;

//get the two controls we created earlier, also with the resource reference and the id
final TextView lv_View = (TextView)findViewById(R.id.lv_View);
lv_View.setText("4");
final EditText et_Text = (EditText)findViewById(R.id.et_Text);  

//add new KeyListener Callback (to record key input)
et_Text.setOnKeyListener(new View.OnKeyListener()
{
    //function to invoke when a key is pressed
    public boolean onKey(View v, int keyCode, KeyEvent event)
    {
        //check if there is 
        if (event.getAction() == KeyEvent.ACTION_DOWN)
        {
            //check if the right key was pressed
            if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER)
            {
                                //add the text to the text view
                lv_View.setText(lv_View.getText() + ", " + 
                                 et_Text.getText());
                                //and clear the EditText control
                et_Text.setText("");
                return true;
            }
        }
        return false;
    }
});
return true;
} 
}

test manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
android:versionCode="1"
android:versionName="1.0" >

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

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.test.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

</manifest>

strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">test</string>
<string name="hello_world">&quot;I got it to work!&quot;</string>
<string name="menu_settings">Settings</string>

</resources>

activity_main.xml (layout)

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
 >
 <edittext android:layout_height="wrap_content" 
         android:layout_width="fill_parent" android:textColor="#FF0000FF"
         android:id="@+id/et_Text" />
<textview android:layout_height="wrap_content" android:layout_width="fill_parent"
android:textColor="#FF00FF00" android:id="@+id/lv_View" />
<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:textColor="#FF00FF00"
    android:text="@string/hello_world" 
    />

</RelativeLayout>

LogCat report

12-18 21:34:37.873: W/Trace(713): Unexpected value from nativeGetEnabledTags: 0
12-18 21:34:38.442: W/Trace(713): Unexpected value from nativeGetEnabledTags: 0
12-18 21:34:38.522: W/Trace(713): Unexpected value from nativeGetEnabledTags: 0
12-18 21:34:39.562: D/AndroidRuntime(713): Shutting down VM
12-18 21:34:39.602: W/dalvikvm(713): threadid=1: thread exiting with uncaught exception     (group=0x40a70930)
12-18 21:34:39.812: E/AndroidRuntime(713): FATAL EXCEPTION: main
12-18 21:34:39.812: E/AndroidRuntime(713): java.lang.RuntimeException: Unable to start     activity ComponentInfo{com.example.test/com.example.test.MainActivity}:     android.view.InflateException: Binary XML file line #7: Error inflating class edittext
12-18 21:34:39.812: E/AndroidRuntime(713):  at     android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.os.Handler.dispatchMessage(Handler.java:99)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.os.Looper.loop(Looper.java:137)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.app.ActivityThread.main(ActivityThread.java:5039)
12-18 21:34:39.812: E/AndroidRuntime(713):  at java.lang.reflect.Method.invokeNative(Native Method)
12-18 21:34:39.812: E/AndroidRuntime(713):  at java.lang.reflect.Method.invoke(Method.java:511)
12-18 21:34:39.812: E/AndroidRuntime(713):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-18 21:34:39.812: E/AndroidRuntime(713):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-18 21:34:39.812: E/AndroidRuntime(713):  at dalvik.system.NativeStart.main(Native Method)
12-18 21:34:39.812: E/AndroidRuntime(713): Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class edittext
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:698)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-18 21:34:39.812: E/AndroidRuntime(713):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.app.Activity.setContentView(Activity.java:1881)
12-18 21:34:39.812: E/AndroidRuntime(713):  at com.example.test.MainActivity.onCreate(MainActivity.java:17)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.app.Activity.performCreate(Activity.java:5104)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
12-18 21:34:39.812: E/AndroidRuntime(713):  ... 11 more
12-18 21:34:39.812: E/AndroidRuntime(713): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.edittext" on path: /data/app/com.example.test-2.apk
12-18 21:34:39.812: E/AndroidRuntime(713):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
12-18 21:34:39.812: E/AndroidRuntime(713):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-18 21:34:39.812: E/AndroidRuntime(713):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.view.LayoutInflater.createView(LayoutInflater.java:552)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:643)
12-18 21:34:39.812: E/AndroidRuntime(713):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
12-18 21:34:39.812: E/AndroidRuntime(713):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
12-18 21:34:39.812: E/AndroidRuntime(713):  ... 21 more

Thanks for any help! If you need any more information, just let me know. I’m still not sure of what’s needed to trouble shoot these kinds of errors.

  • 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-16T00:11:33+00:00Added an answer on June 16, 2026 at 12:11 am

    In your layout XML file, you need to ensure that textview and edittext are CamelCase otherwise android will not know how to inflate the layout. This is because the android layout inflater attempts to instance a class by using the name specifed in the XML file. In this case, android.view.TextView and android.view.EditText.

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context=".MainActivity">
    
        <EditText android:layout_height="wrap_content" 
             android:layout_width="fill_parent"
             android:textColor="#FF0000FF"
             android:id="@+id/et_Text" />
    
        <TextView android:layout_height="wrap_content"
             android:layout_width="fill_parent"
             android:textColor="#FF00FF00"
             android:id="@+id/lv_View" />
    
        <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerHorizontal="true"
             android:layout_centerVertical="true"
             android:textColor="#FF00FF00"
             android:text="@string/hello_world" />
    
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

first time trying XNA Framework in C#.. followed this tutorial: http://www.uxmagic.com/blog/post/2010/08/17/e2809cHello-Worlde2809d-for-XNA-Game-Studio-40.aspx Everything's ok until
This is probably very simple! I followed a tutorial from http://webdesignerwall.com/demo/jquery-sequential/jquery-sequential-list.html It works fine
I'm trying to follow this tutorial to try and begin to understand the Visual
I just wanted that when this is inserted in the URL: http://website.com/pelicula/0221889/ http://website.com/pelicula/0221889/posters/ It
I'm following this tutorial to learn Android's Camera API. I made it the end
I've followed this tutorial but when I try to run the application I get
I am trying to use apn_on_rails and followed this tutorial to configure it The
I followed this code project tutorial for using SharpGL with WPF to create a
I followed a tutorial here for how to include a file inside of an
I followed a tutorial on creating your own custom WP themes. They are stripped

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.