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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:55:25+00:00 2026-06-06T17:55:25+00:00

I’m new in eclipse and I have got a project that can add and

  • 0

I’m new in eclipse and I have got a project that can add and edit name , age , etc using a textview maybe same like a contacts list

in here i have 3 class.. 1 for arraylist data 1 for view holder and the last is my activity
the problem is when i use a parseint for the age.. if i using string there is no any problem
when i using a parseint and after i fill in name and age and press add button it show me the application has stopped unexpectedly..

this is some of the code

public void Save(View view){
        @SuppressWarnings("unchecked")

        ArrayAdapter<Data> adapter = (ArrayAdapter<Data>)getListAdapter();

        EditText Name = (EditText)findViewById(R.id.Name);
        EditText Age = (EditText)findViewById(R.id.Age);

        String name = Name.getText().toString();
        int age = Integer.parseInt(Age.getText().toString());

        if (edit)
        {
            Data temp = adapter.getItem(position);
            temp.setData(name,age);
        }
        else
        {
            Data temp = new Data(name, age);
            friends.add(temp);
        }
        viewflipper.showNext();
    }

that int age = Integer.parseInt(Age.getText().toString()); i don’t know whats wrong with that code if i use string its work and i have already change my xml for my textview to this
android:inputType="number" > but it also same error

this is the logcat

06-15 08:25:56.419: W/KeyCharacterMap(6003): No keyboard for id 0
06-15 08:25:56.419: W/KeyCharacterMap(6003): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
06-15 08:25:58.619: W/ResourceType(6003): No package identifier when getting value for resource number 0x0000000c
06-15 08:25:58.619: D/AndroidRuntime(6003): Shutting down VM
06-15 08:25:58.629: W/dalvikvm(6003): threadid=1: thread exiting with uncaught exception (group=0x40015560)
06-15 08:25:58.650: E/AndroidRuntime(6003): FATAL EXCEPTION: main
06-15 08:25:58.650: E/AndroidRuntime(6003): android.content.res.Resources$NotFoundException: String resource ID #0xc
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.content.res.Resources.getText(Resources.java:201)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.widget.TextView.setText(TextView.java:2857)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at itnb.week.Exercise6Activity$DataAdapter.getView(Exercise6Activity.java:165)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.widget.AbsListView.obtainView(AbsListView.java:1430)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.widget.ListView.measureHeightOfChildren(ListView.java:1216)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.widget.ListView.onMeasure(ListView.java:1127)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.View.measure(View.java:8313)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.View.measure(View.java:8313)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.View.measure(View.java:8313)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.widget.LinearLayout.measureVertical(LinearLayout.java:531)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.View.measure(View.java:8313)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.View.measure(View.java:8313)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.ViewRoot.performTraversals(ViewRoot.java:839)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.os.Looper.loop(Looper.java:123)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at android.app.ActivityThread.main(ActivityThread.java:3683)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at java.lang.reflect.Method.invokeNative(Native Method)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at java.lang.reflect.Method.invoke(Method.java:507)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-15 08:25:58.650: E/AndroidRuntime(6003):     at dalvik.system.NativeStart.main(Native Method)
  • 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-06T17:55:27+00:00Added an answer on June 6, 2026 at 5:55 pm

    use

     textview.setText(Integer.toString(age));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.