I’ll make it more concise as possible:
-
I have Eclipse Indigo SR2 with ADT plugin installed.
-
I have checked and confirmed that the ADT plugin is pointing correctly to the Android SDK
installed on my computer. Android SDK version is r16.
- Followed the instructions on Android SDK Dev site for “Hello World Tutorial”, copied/pasted
the code sample provide into my Android project. Nothing wrong here so far.
- Opened up AVD Manager for Android, created a new AVD running Android 2.3.3. Start up
the emulator and let it run for 1 hour while preparing my dinner (Beef Noodles and a simple
salad).
- Came back (with a full belly) to find Android emulator running normally. The Android
Launcher app is there to greet me. So, it means the emulator is standing by.
- Go back to Eclipse (no shutting down any applications in Windows) and start debugging my
Hello World project.
- Saw the console verbosing the following messages
.
[2012-03-08 04:57:02 - MarbleRun] ------------------------------
[2012-03-08 04:57:02 - MarbleRun] Android Launch!
[2012-03-08 04:57:02 - MarbleRun] adb is running normally.
[2012-03-08 04:57:02 - MarbleRun] No Launcher activity found!
[2012-03-08 04:57:02 - MarbleRun] The launch will only sync the application package on the
device!
[2012-03-08 04:57:02 - MarbleRun] Performing sync
[2012-03-08 04:57:02 - MarbleRun] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'Android_Practice'
[2012-03-08 04:57:02 - MarbleRun] Uploading MarbleRun.apk onto device 'emulator-5554'
[2012-03-08 04:57:02 - MarbleRun] Installing MarbleRun.apk...
[2012-03-08 04:57:05 - MarbleRun] Success!
[2012-03-08 04:57:05 - MarbleRun] \MarbleRun\bin\MarbleRun.apk installed on device
[2012-03-08 04:57:05 - MarbleRun] Done!
-
Noticed the project isn’t running in the emulator. There was no “Hello World” text.
-
Thought there may be a problem with loading the emulator, I opened up an old Android
project (less than a year old) and start debugging it. The same emulator debugs the APK just
fine, Buttons, TextViews, RadioButtons, working flawlessly.
- Noticed that this different project contains new console logs that the first Hello World
project failed to report. The following logs are copied from a different Android project on the
same computer running in the same emulator/debugging environment:
[2012-03-08 05:11:26 - Android] Starting activity android.myslocation.MySLocation on device
emulator-5554
[2012-03-08 05:11:27 - Android] ActivityManager: Starting: Intent {
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
cmp=android.myslocation/.MySLocation }
[2012-03-08 05:11:27 - Android] Attempting to connect debugger to 'android.myslocation' on
port 8614
- It is missing from the Hello World project, hence I’m assuming that something is wrong
with my code, and not the emulator.
- Decided to come to StackOverflow and post my problem so as to figure out what’s going
on?
My project code (Currently):
package com.marblerun;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import android.widget.Toast;
public class BaseActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
for (int i = 0; i < 1000; i++) {
Log.d("Test", "Hello World");
TextView v = new TextView(this);
v.setText("TESTING THIS OUT.");
v.bringToFront();
if (v.requestFocus() == false)
Log.d("Failed: ", "Nothing works");
}
Toast.makeText(this, "Test!", 10);
}
}
Here’s my problem. Thanks in advance.
Looks like you’re missing something in your manifest file, either the whole
activitytag or theintent-filterinside it.Make sure you have something like this in your AndroidManifest.xml inside of the
applicationtag: