?
Solved

first android app

Posted on 2014-10-20
2
Medium Priority
?
229 Views
Last Modified: 2014-10-31
I am trying to develop my first android application in Eclipse.  I am able to run my code inside of an emulator, but I can't get it to stop on any breakpoints, and I can't get it to show the textbox and button I added.

package com.netendeavor.ws;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;


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.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}

Open in new window






log:
[2014-10-20 09:45:44 - WS] ------------------------------
[2014-10-20 09:45:44 - WS] Android Launch!
[2014-10-20 09:45:44 - WS] adb is running normally.
[2014-10-20 09:45:44 - WS] Performing com.netendeavor.ws.MainActivity activity launch
[2014-10-20 09:45:45 - WS] Automatic Target Mode: Preferred AVD 'tomemulator2' is not available. Launching new emulator.
[2014-10-20 09:45:45 - WS] Launching a new emulator with Virtual Device 'tomemulator2'
[2014-10-20 09:46:03 - Emulator] emulator: warning: opening audio input failed
[2014-10-20 09:46:03 - Emulator] 
[2014-10-20 09:46:03 - WS] New emulator found: emulator-5554
[2014-10-20 09:46:03 - WS] Waiting for HOME ('android.process.acore') to be launched...
[2014-10-20 10:00:14 - WS] emulator-5554 disconnected! Cancelling 'com.netendeavor.ws.MainActivity activity launch'!

Open in new window

0
Comment
Question by:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
Chris Harte earned 2000 total points
ID: 40392398
If you want it to stop at debug break points, you have to include the following line of code before the breakpoint

android.os.Debug.waitForDebugger();
0
 
LVL 5

Author Closing Comment

by:Tom Knowlton
ID: 40416350
thx
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Here, we have shared an easy step by step tutorial on how to download instagram images and videos on PC, Android Mobile and iOS mobile.
This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question