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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:06:48+00:00 2026-06-08T07:06:48+00:00

Im trying to debug my menu activity but it cant seem to display the

  • 0

Im trying to debug my menu activity but it cant seem to display the output. The error msg on the screen says Savings Guider(my app name) has stopped working. If I click my app manually from the android menu, it says my app is not installed. However there are no errors in my codes. Anyone can help me?

My Menu Activity codes:

public class SavingsGuiderMenuActivity extends SavingsActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.menu);
    ListView menuList = (ListView) findViewById(R.id.ListView_Menu);
    String[] items = { getResources().getString(R.string.start),
            getResources().getString(R.string.about),
            getResources().getString(R.string.help) };
    ArrayAdapter<String> adapt = new ArrayAdapter<String>(this, R.layout.menu_item, items);
    menuList.setAdapter(adapt);
    menuList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View itemClicked, int position, long id) {
            // Note: if the list was built "by hand" the id could be used.
            // As-is, though, each item has the same id
            TextView textView = (TextView) itemClicked;
            String strText = textView.getText().toString();
            if (strText.equalsIgnoreCase(getResources().getString(R.string.start))) {
                // Launch the app Activity
                startActivity(new Intent(SavingsGuiderMenuActivity.this, SavingsGuiderAppActivity.class));
            } else if (strText.equalsIgnoreCase(getResources().getString(R.string.help))) {
                // Launch the Help Activity
                startActivity(new Intent(SavingsGuiderMenuActivity.this, SavingsGuiderHelpActivity.class));
            } else if (strText.equalsIgnoreCase(getResources().getString(R.string.about))) {
                // Launch the about Activity
                startActivity(new Intent(SavingsGuiderMenuActivity.this, SavingsGuiderAboutActivity.class));
            } 
        }
    });
}

}

My manifest:

  <application
    android:label="@string/splash"
    android:debuggable="true"
    android:icon="@drawable/saving">
    <activity
        android:name=".SavingsGuiderMenuActivity"
        android:label="@string/splash">
        <intent-filter>
            <action
                android:name="android.intent.action.MAIN" />
            <category
                android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

Logcat errors

07-22 03:18:24.712: E/ArrayAdapter(806): You must supply a resource ID for a TextView
07-22 03:18:24.772: E/AndroidRuntime(806): FATAL EXCEPTION: main
07-22 03:18:24.772: E/AndroidRuntime(806): java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:386)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.AbsListView.obtainView(AbsListView.java:2033)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.ListView.measureHeightOfChildren(ListView.java:1244)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.ListView.onMeasure(ListView.java:1155)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.View.measure(View.java:12581)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.RelativeLayout.measureChild(RelativeLayout.java:579)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:392)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.View.measure(View.java:12581)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4671)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.View.measure(View.java:12581)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4671)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.View.measure(View.java:12581)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.LinearLayout.measureVertical(LinearLayout.java:812)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.View.measure(View.java:12581)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4671)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
07-22 03:18:24.772: E/AndroidRuntime(806):  at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2062)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.View.measure(View.java:12581)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1038)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2382)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.os.Handler.dispatchMessage(Handler.java:99)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.os.Looper.loop(Looper.java:137)
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.app.ActivityThread.main(ActivityThread.java:4340)
07-22 03:18:24.772: E/AndroidRuntime(806):  at java.lang.reflect.Method.invokeNative(Native Method)
07-22 03:18:24.772: E/AndroidRuntime(806):  at java.lang.reflect.Method.invoke(Method.java:511)
07-22 03:18:24.772: E/AndroidRuntime(806):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-22 03:18:24.772: E/AndroidRuntime(806):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-22 03:18:24.772: E/AndroidRuntime(806):  at dalvik.system.NativeStart.main(Native Method)
07-22 03:18:24.772: E/AndroidRuntime(806): Caused by: java.lang.ClassCastException: android.widget.LinearLayout cannot be cast to android.widget.TextView
07-22 03:18:24.772: E/AndroidRuntime(806):  at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:379)
07-22 03:18:24.772: E/AndroidRuntime(806):  ... 33 more
  • 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-08T07:06:49+00:00Added an answer on June 8, 2026 at 7:06 am

    No your xml is fine I think. If you’re trying to create a menu to choose between activities, this is probably not the best way.

    String classes[] = {"class_a","class_b","class_c"};
    String class = classes[position]; Class ourClass=Class.forName("package_name"+class);
    Intent intent = new Intent(Menu.this,ourClass);
    startActivity(intent);
    

    Try this in your onItemClicked() in try brackets.

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

Sidebar

Related Questions

I am trying to start an activity from an options menu, but my app
When trying to debug a program on Windows I can't seem to find where
I'm trying to debug this problem but not sure where exactly i need to
Trying to debug PHP using its default current-line-only error messages is horrible. How can
I am getting this error while I am trying to debug my app on
I'm trying to debug a problem that happens on Safari 3.1 (but not in
I am trying to debug a spec test using RubyMine, but, I get: uninitialized
I am having real problems trying debug my code to malfunctioning print statements. I
I'm trying to debug an old VB6 program at my job. It's full of
I'm trying to debug a web page that makes heavy use of events, and

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.