Solved

first android app

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
The case of the missing phone talks about the way a small electronic gadget (the mobile phone) has penetrated into our lives and has made us addicted to it.
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…

910 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

21 Experts available now in Live!

Get 1:1 Help Now