Solved

first android app

Posted on 2014-10-20
2
202 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 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:knowlton
ID: 40416350
thx
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Update Samsung Galaxy S3 to Android 5 or 6 5 26
only getting 3g not 4g everywhere 15 80
Contacts, help Android 5 43
Delphi: barcode reading on android platform 1 32
I recently asked a question (http://www.experts-exchange.com/Programming/Smartphones/Android/Q_28684946.html) about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
Introduction Everyone is using a smartphone these days. Contacts, messages, applications, documents, bookmarks, pictures, videos and other stuff which you created and are present only on your device come under the umbrella called “Personal Data”.…
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…

831 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