DroidForums.net is the original Verizon Android Forum! Registered Users do not see these ads. Please Register - It's Free!
Results 1 to 2 of 2

Thread: My first Android app attempt

  1. Droid Newbie
    clayshannon's Avatar
    Member #
    214131
    Join Date
    Jul 2011
    Posts
    1
    Phone
    Enter Current Phone Model Here
    #1

    My first Android app attempt

    I'm trying to run a very simple (my first) Android app in an emulator I've set up, but my app doesn't display within the emulator. I'm expecting to see (code below) a TextView with some Text assigned to it.

    All I see is a black "honeycomb" background in the emulator (which looks like a "DOS box" or Command prompt) with the time (5 hours in the future), date, and "Charging (50%)"

    I'm using an AVD set up to use a version 3.2 emulator. I've got that (Andorid 3.2 SDK) and Java 7 installed.

    Here is what is contained in my Eclipse tabs:

    Console:

    [2011-07-29 02:16:39 - YeauxDudimus] ------------------------------
    [2011-07-29 02:16:39 - YeauxDudimus] Android Launch!
    [2011-07-29 02:16:39 - YeauxDudimus] adb is running normally.
    [2011-07-29 02:16:39 - YeauxDudimus] Performing com.bobas.YeauxDudimusActivity activity launch

    Error Log:

    While loading class "com.android.ide.eclipse.adt.ToolsLocator", thread "Thread[Worker-2,5,main]" timed out waiting (5016ms) for thread "Thread

    Problems:

    None

    Code:

    Code:
    package com.bobas;
    
    import android.app.Activity;
    import android.os.Bundle;
    import android.widget.TextView;
    
    public class YeauxDudimusActivity extends Activity {
        /** Called when the activity is first created. */   
    @Override    
    public void onCreate(Bundle savedInstanceState) {        
      super.onCreate(savedInstanceState);        
      TextView tv = new TextView(this);        
      tv.setText("Yeaux, Dudimus");        
      setContentView(tv);        
      setContentView(R.layout.main);            
      }
    }
  2. Droid
    naDroid.com's Avatar
    Member #
    171234
    Join Date
    Feb 2011
    Location
    Canton, OH
    Posts
    36
    Liked
    1 times
    Twitter
    dixon07
    Phone
    G'nex
    #2
    Have you tried launching the emulator separately first using Android SDK and AVD Manager? Also, can you create a new Android project and have it run on the emulator?

    I don't see anything in your code that would cause a problem, however there is a bug that will give you unexpected results:
    Code:
    @Override    
    public void onCreate(Bundle savedInstanceState) {        
      super.onCreate(savedInstanceState);        
      TextView tv = new TextView(this);        
      tv.setText("Yeaux, Dudimus");        
      setContentView(tv);        
      setContentView(R.layout.main);            
      }
    You are calling setContentView twice. You either need to remove:
    Code:
    setContentView(R.layout.main);
    or add the TextView to your main.xml layout file.

Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Last Attempt
    By DroiDTalenT in forum Droid X General Discussions
    Replies: 2
    Last Post: 09-28-2010, 06:42 PM
  2. Here is my attempt ...
    By YankInDaSouth in forum Android Themes
    Replies: 0
    Last Post: 09-25-2010, 12:08 PM
  3. Can someone attempt to help me?
    By sandfreak in forum Rescue Squad Help
    Replies: 4
    Last Post: 05-27-2010, 06:46 PM
  4. Going to attempt to...
    By meganimel in forum Android Hacks and Help
    Replies: 6
    Last Post: 05-23-2010, 12:47 PM
  5. First attempt at dock
    By BhamItGeek in forum Android Themes
    Replies: 0
    Last Post: 02-20-2010, 10:40 PM

Search tags for this page

android 3.2 emulator

,
android firstclass 2011
,

android firstclass app

,

first class android app

,

first class app for android

,

first-class app for android

,

firstclass android app

,

firstclass app

,

firstclass email android

,

firstclass email android app

,

is there a firstclass app for droids?

,
launch date firstclass app for android
,

my apps

,

my first android app

,
setting up first class email on android phone
Click on a term to search our site for related topics.
Find us on Google+