Solved

first android app

Posted on 2014-10-20
2
190 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:knowlton
2 Comments
 
LVL 16

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:knowlton
ID: 40416350
thx
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Recently Amazon announced their entry in the tablet device called the Amazon Kindle Fire. Some of you might have used an Ipad or have considered buying one. While they're similar in form and function in that they both have color displays with multit…
Android SDK is used for creating an android software application. It includes document and tools which are necessary to develop applications with java. In fact Android SDK is harder than other software infrastructure, because there is a virtual devi…
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.
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.

759 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now