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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:05:53+00:00 2026-05-23T13:05:53+00:00

Update: Fixed, this was due to missing properties in views and my not knowing

  • 0

Update: Fixed, this was due to missing properties in views and my not knowing how to work the debugger 🙂

I’m really new to Android. I’ve just finished the Notepad tutorial and am making something similar (most of the code is exactly the same). The sequence of events I’m going through:

  1. Debug app
  2. Click Menu, which has the correct items
  3. Click Insert, which opens a new Activity (GoalEdit)
  4. I hit a breakpoint on the first line of GoalEdit.onCreate and get these warnings:
    a. (ActivityManager) Launch timeout has expired, giving up wake lock!
    b. (ActivityManager) Activity idle timeout for HistoryRecord{…}
  5. I have a breakpoint at setContentView in GoalEdit.onCreate – after this is passed:
    a. ActivityThread.perfo: Source not found.

The relevant code is below:

GoalsList.java

/**
 * Add a menu to this activity
 */
@Override
public boolean onCreateOptionsMenu(Menu menu) {
    super.onCreateOptionsMenu(menu);

    menu.add(0, INSERT_ID, 0, R.string.menu_insert);
    return true;
}

/**
 * Catch the menuItemSelected event
 */
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
    switch (item.getItemId()) {
    case INSERT_ID:
        createGoal();
        return true;
    }

    return super.onMenuItemSelected(featureId, item);
}

/**
 * Open the Edit activity to create a new goal
 */
private void createGoal() {
    Intent i = new Intent(this, GoalEdit.class);
    startActivityForResult(i, ACTIVITY_CREATE);
}

GoalEdit.java

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

    mDbGoals = new GoalDbTable(this);
    mDbGoals.open();

    setContentView(R.layout.goal_edit);

    mName = (EditText) findViewById(R.id.name);
    Button finishBtn = (Button) findViewById(R.id.finish);

    mRowId = (savedInstanceState == null) ? null :
        (Long) savedInstanceState.getSerializable(GoalDbTable.KEY_ROWID);
    if (mRowId == null) {
        Bundle extras  = getIntent().getExtras();
        mRowId = (extras != null) ? extras.getLong(GoalDbTable.KEY_ROWID)
                                  : null;
    }

    populateFields();

    finishBtn.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            setResult(RESULT_OK);
            finish();
        }
    });
}

private void populateFields() {
    if (mRowId != null) {
        Cursor goal = mDbGoals.find(mRowId);
        startManagingCursor(goal);

        mName.setText(goal.getString(
                goal.getColumnIndexOrThrow(GoalDbTable.KEY_NAME)));
    }
}

@Override
protected void onResume() {
    super.onResume();
    populateFields();
}

I feel like the error is that it can’t find GoalEdit (although it obviously can). Are there any obvious fubar’s in my code (or other things I should check)?

Edit: Figured out how to use the debugger a bit better, had to press resume a few more times to show an exception.

Exceptions

ERROR/AndroidRuntime(741): 
  java.lang.RuntimeException: Unable to start activity 
  ComponentInfo{com.rossmasters.mygoals/com.rossmasters.mygoals.GoalEdit}: 
    java.lang.RuntimeException: 
      Binary XML file line #9: You must supply a layout_width attribute.

I’m not sure which file that is referring to however, I’ve added layout_width's to each item.

  • 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-05-23T13:05:53+00:00Added an answer on May 23, 2026 at 1:05 pm

    Ross enable your logcat and you will get what is your problem,

    Window > Show view > Other > Android >
    Logcat

    you are probably missin a property in your goal_edit.xml layout

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

Sidebar

Related Questions

UPDATE It looks like this problem has been quietly fixed in iOS 4.3. Up
Update: Now that it's 2016 I'd use PowerShell for this unless there's a really
Update: This is a bug but won't get fixed until the next release of
Update: I have fixed this issue I have the following block of code which
Update: Check out this follow-up question: Gem Update on Windows - is it broken?
Update : Looks like the query does not throw any timeout. The connection is
Update: fixed delta calculations in code, still the issue remains Folks, could you please
After I use setcontrolfont, the text of the text field does not update. The
UPDATE: I've filed this as an issue on Microsoft Connect if you can reproduce
I haven't really done much on this side of project development so please forgive

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.