Solved

first android app

Posted on 2014-10-20
2
223 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 500 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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.
If you use the Google Now Launcher, as an aftermarket add on, have a Samsung Note 5 and are worried about power consumption be wary of using the ultra power saving mode.  Here is what happened to me when I made the mistake of trying this out...
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
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…

717 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