I have installed latest version Eclipse Classic (3.7.1),
Android sdk (r16)
jdk x64 6u30 (also tried 6u25 and ver. 7)
Platform tools etc.
My computer specs: Intel i5-2500K, 16GB DDR3 Ram.
OS: Win 7 (x64 Prof), also tried in VirtualBox (WinXP SP3 x32).
So i followed the official 'Hello World' tutorial from Google site:
package com.test.AndroidApp;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class TestAppActivity 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("Hello, Android...."); // BREAKPOINT HERE
setContentView(tv);
}
}
console messages when starting debugger:
[2012-02-11 00:45:39 - hello] ------------------------------
[2012-02-11 00:45:39 - hello] Android Launch!
[2012-02-11 00:45:39 - hello] adb is running normally.
[2012-02-11 00:45:39 - hello] Performing com.example.helloandroid.HelloActivity activity launch
[2012-02-11 00:45:39 - hello] Automatic Target Mode: Preferred AVD 'avd' is not available. Launching new emulator.
[2012-02-11 00:45:39 - hello] Launching a new emulator with Virtual Device 'avd'
[2012-02-11 00:45:42 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
[2012-02-11 00:45:42 - hello] New emulator found: emulator-5554
[2012-02-11 00:45:42 - hello] Waiting for HOME ('android.process.acore') to be launched...
[2012-02-11 00:45:51 - hello] HOME is up on device 'emulator-5554'
[2012-02-11 00:45:51 - hello] Uploading hello.apk onto device 'emulator-5554'
[2012-02-11 00:45:51 - hello] Installing hello.apk...
[2012-02-11 00:45:55 - hello] Success!
[2012-02-11 00:45:55 - hello] Starting activity com.example.helloandroid.HelloActivity on device emulator-5554
[2012-02-11 00:45:55 - hello] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.helloandroid/.HelloActivity }
[2012-02-11 00:45:56 - hello] Attempting to connect debugger to 'com.example.helloandroid' on port 8627
And when the debugger hits the breakpoint, i point mouse cursor to the 'tv' variable, the Variable hint window is displayed and is being filled veeeeeery slowly.
It takes 0.5-1 sec to display each member of tv (TextView), by display i mean to draw variable icon, name and value.
While the debugger displays all members of 'tv' i can scroll it down to the bottom, select any variable (i don't see them, but i can select them if i click somewhere to the left of the hint window) and most interesting part - i can see var member value! (without name, only value).
It takes about 1 minute to display all members of 'tv'. (processor load is 0-2% during this time)
If i close hint window, and open it again - the process repeats, taking 1 minute again.
Variables view window behaves the same way as a hint popup window. (i open up 'tv' variable and it takes 1 min. to display all its members).
I tried doing the same in VirtualBox machine with winxp32, no luck.
I tried using another computer at the office (core E6600, win 7 prof x64) - no luck.
I tried installing Eclipse on MacOs (hackintosh using the same machine) - works blazingly fast.
After Googling about this problem i found the same bug report, dated 2006, and it has been fixed in eclipse 3.1.6.
Is it only me?
I didn't find anyone else mentioning this problem. Maybe no one else has installed latest eclipse and adt plugin yet?
p.s.
I've developed apps for iOs on the same machine, and there was no such problem.
I also have tried to debug simple Java project - variable hint and window works fast!
Sounds like the same issue as this question
Eclipse auto suggest list very slow
I had the same problem and found my answer here
https://groups.google.com/group/android-developers/browse_thread/thread/85dc1aae3bafff5e
In summary - "turn off JAX-WS Proposals in Content Assist
Window > Preferences --> Java > Editor > Content Assist > Advanced "
Wow... Look how far we've come.
You can download Android Studio now.
Related
I am trying to develop my first Android app through the ADT plugins for Eclipse. I have downloaded and installed both ADT and the Android SDK and have created a HelloAndroid Android project. I created a new AVD called HelloAndroidEmulator1 just for testing my HelloAndroid app.
When I go to run my project (rooted at HelloAndroidActivity.java which was autogenerated for me), I'm getting some bizarre errors. I have not changed any of the source code that Eclipse generated for me, and have not added any of my own code. I'm simply trying to compile and run what was autogenerated.
When I look in the layout/main.xml file's Graphical Layout, I see a rendering of my app displaying the text:
HelloAndroid
Hello World, HelloAndroidActivity!
Where HelloAndroid is the name of my Eclipse project and HelloAndroidActivity is the name of my main driver that Eclipse makes for me.
When I go to actually run the application, I do not get anything like that output at all. The emulator loads up, and after about 60 seconds of displaying the startup "android" splash screen, it starts to load up but then gives me an error:
Launcher is not responding. Would you like to close it?
Back inside Eclipse, my console output looks like this (after I've closed the launcher):
[2012-01-03 11:23:23 - HelloAndroid] ------------------------------
[2012-01-03 11:23:23 - HelloAndroid] Android Launch!
[2012-01-03 11:23:23 - HelloAndroid] adb is running normally.
[2012-01-03 11:23:23 - HelloAndroid] Performing net.me.myprojects.android.proj.HelloAndroidActivity activity launch
[2012-01-03 11:23:23 - HelloAndroid] Automatic Target Mode: Preferred AVD 'HelloAndroidEmulator1' is not available. Launching new emulator.
[2012-01-03 11:23:23 - HelloAndroid] Launching a new emulator with Virtual Device 'HelloAndroidEmulator1'
[2012-01-03 11:23:36 - Emulator] emulator: WARNING: Unable to create sensors port: Unknown error
[2012-01-03 11:23:36 - HelloAndroid] New emulator found: emulator-5554
[2012-01-03 11:23:36 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2012-01-03 11:25:00 - HelloAndroid] HOME is up on device 'emulator-5554'
[2012-01-03 11:25:00 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2012-01-03 11:25:00 - HelloAndroid] Installing HelloAndroid.apk...
[2012-01-03 11:27:03 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
[2012-01-03 11:27:03 - HelloAndroid] (null)
[2012-01-03 11:27:03 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554': EOF
[2012-01-03 11:27:03 - HelloAndroid] com.android.ddmlib.InstallException: EOF
[2012-01-03 11:27:03 - HelloAndroid] Launch canceled!
I tried searching online but couldn't find anything that jumped out as being the clear culprit. I must not have something installed or configured correctly, but I can confirm that:
ADT is installed inside Eclipse
The SDK is installed under C:\Users\me\android-sdk
I can open and edit both the SDK and AVD Managers
Edit: Here is the source for HelloAndroidActivity.java:
package net.me.myprojects.android.proj;
import android.app.Activity;
import android.os.Bundle;
public class HelloAndroidActivity extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
Any ideas as to what is happening here?!?! Thanks in advance!
Make sure your Virtual Device has a valid SD card size (i.e. bigger than 0)
Try few fixes:
Shut down the emulator and the IDE and relaunch the application.
Window -> Android SDK and AVD Manager -> Create a new AVD manager with different name and launch it.
If this doesn't work then give me your HelloAndroidActivity class. I will try to run it on my machine and will see.
Add text view to it..
public class HelloAndroidActivity 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("Hello, Android");
setContentView(tv);
}
}
If you are still getting any error follow this tutorial. Android Tutorial
I had the same error while I was working with a new App which used SQLite.
Anyways, the issue was that even after you close your Eclipse and Emulator.. in Task Manager the process adb.exe or abd.exe*32 was still running.
Steps:
1. Close eclipse and emulator.
2. Kill the process adb.exe or abd.exe*32.
3. Start your eclipse, clean build your app once and its almost like new.
Happy coding.
For me, the error went away on its own after trying to re-run multiple times. Possibly the system filtered itself of some old copy in memory after a while.
Start the emulator manually and check whether your app is installed. If its installed just delete it and retry to launch your app with eclipse.
This is the error message I have met when I run my app, and my logcat is empty
-08-09 11:19:22 - TestCity] ------------------------------
[2011-08-09 11:19:22 - TestCity] Android Launch!
[2011-08-09 11:19:22 - TestCity] adb is running normally.
[2011-08-09 11:19:22 - TestCity] Performing com.pack.android.TestCityActivity activity launch
[2011-08-09 11:19:22 - TestCity] Automatic Target Mode: launching new emulator with compatible AVD 'my_device'
[2011-08-09 11:19:22 - TestCity] Launching a new emulator with Virtual Device 'my_device'
[2011-08-09 11:19:24 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2011-08-09 11:19:24 - Emulator] ko:Snapshot storage already in use: C:\Documents and Settings\Ram\.android\avd\my_device.avd/snapshots.img
I had the same problem. Turned out to be caused (in part) by leftover lock files from a previous run (which may explain why ntc's 'wipe user data' fix didn't work for me).
Look in the folder shown in the error message (that is, without the snapshots.img bit).
You should see several folders ending in .lock
each folder may contain a file called 'pid'. If so, delete the 'pid' files.
That allows the emulator to start, but it stuck at the plain text 'android' stage,
so I deleted the various .img files and tried again and the emulator started OK.
Check if the Built-in (type of emulator) is the same in your Graphical Layout. You should configure the same type (but version can be different).
Try to kill your ADB-server using adb kill-server
Then restart your server. More info over here
If all fails, create a new AVD.
If you are using Eclipse ADT, just press 'Clean...' from Project menu. Then run again. Worked for me.
just kill avd process from task manager and restart your eclipse.
I'm using eclipse and have the android plugin. I made a simulator that is running 1.6. I'm trying to run the demo app that it comes with and it freezes on me and I have to end the process. I never get it to run the demo. Anyone have some advice?
Demo App Code:
package com.demo.DemoApp;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
My Output:
[2011-06-29 15:31:32 - DemoApp] ------------------------------
[2011-06-29 15:31:32 - DemoApp] Android Launch!
[2011-06-29 15:31:32 - DemoApp] adb is running normally.
[2011-06-29 15:31:32 - DemoApp] Performing com.demo.DemoApp.MainActivity activity launch
[2011-06-29 15:31:32 - DemoApp] Automatic Target Mode: launching new emulator with compatible AVD 'Test-Device-1.6'
[2011-06-29 15:31:32 - DemoApp] Launching a new emulator with Virtual Device 'Test-Device-1.6'
[2011-06-29 15:31:41 - DemoApp] New emulator found: emulator-5554
[2011-06-29 15:31:41 - DemoApp] Waiting for HOME ('android.process.acore') to be launched...
[2011-06-29 15:32:29 - DemoApp] emulator-5554 disconnected! Cancelling 'com.demo.DemoApp.MainActivity activity launch'!
This is not a solution for your particular problem, but i gave up on the simulator, is just to cumbersome and slow. Get a real device, your life will improve greatly. They are fairly cheap right now. Trust me, the simulator is just not worth your patience.
Wipe user data on the simulator to start it from scratch. That usually resolves this problem for me.
The android default emulators are very slow. You can use any real device or Gennymotion in your system. Gennymotion simulators have better performance than the default ones.
i had a working application until i changed the package name in the AndroidManifest.xml. I changed it back, but then i found that i had two files in the gen folder.
I usually (as now) have sg like this:
But that time had something else in my gen folder: just "com.bfarago" as far as i remember and another R.java inside that was complaining about the package name. I deleted this package with the R.java and since then i cannot launch the application.
I exited and restarted eclipse and at the launch its stuck at this point:
[2011-02-12 14:04:55 - Nevnap] Android Launch!
[2011-02-12 14:04:55 - Nevnap] adb is running normally.
[2011-02-12 14:04:55 - Nevnap] Performing com.bfarago.nevnap.MainActivity activity launch
[2011-02-12 14:04:55 - Nevnap] Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'
[2011-02-12 14:04:55 - Nevnap] Launching a new emulator with Virtual Device 'my_avd'
[2011-02-12 14:04:55 - Emulator] emulator: ERROR: the user data image is used by another emulator. aborting
[2011-02-12 14:04:59 - Nevnap] New emulator found: emulator-5554
[2011-02-12 14:04:59 - Nevnap] Waiting for HOME ('android.process.acore') to be launched...
Logcat:
02-12 14:06:21.795: WARN/MountService(65): Waiting too long for mReady!
Later i will need to recreate the whole app but now i want this to work again.
Please help me..
You can safely delete any R.java and it will regenerate them for you. Try making a new AVD and restarting your computer to fix the second problem .
(I am posting this to close the topic as i first commented this weeks ago)
Thank you guys. Luckily i had the .apk file on my phone so I just copied it to computer and now it's working again.
Hello stackOverflow readers,
I am hoping that this is a simple setup issue, but here it goes:
Eclipse 3.6.0
AVD 2.2 and 1.5 (created both and tried with both)
XP Pro 2002 SP3
I followed the tutorial at site http://developer.android.com/resources/tutorials/hello-world.html but my custom TextView control never rendered.
I set a few breakpoints in the public class HelloAndroid extends Activity method and these breakpoints are never tripped. It is as if my android.process.acore is never run, based on the console output.
I am tempted to remove all and reinstall the packages, but I thought I would ask the web for a little guidance first.
This is the output in the console window:
[2010-08-24 12:05:08 - HelloAndroid2] Android Launch!
[2010-08-24 12:05:08 - HelloAndroid2] adb is running normally.
[2010-08-24 12:05:08 - HelloAndroid2] Performing com.example.helloandroid2.HelloAndroid activity launch
[2010-08-24 12:05:08 - HelloAndroid2] Automatic Target Mode: launching new emulator with compatible AVD 'My_avd_2_point_2'
[2010-08-24 12:05:08 - HelloAndroid2] Launching a new emulator with Virtual Device 'My_avd_2_point_2'
[2010-08-24 12:05:11 - HelloAndroid2] New emulator found: emulator-5554
[2010-08-24 12:05:11 - HelloAndroid2] Waiting for HOME ('android.process.acore') to be launched...
< I then kill the Android simulator here >
[2010-08-24 12:05:34 - HelloAndroid2] emulator-5554 disconnected! Cancelling 'com.example.helloandroid2.HelloAndroid activity launch'!
Thanks in advance for helping me understand this issue.
What is displayed in the emulator screen ? Do you get to the "unlock" screen ?
It seems you don't wait enough for the emulator to launch.
I have the same issue but waiting and using the on/off button does not work. (I have the unlock screen up.)
Oddly, a different tutorial appears to work (Simple Flashlight).
Never mind - newbie issue I guess.
I got it to work by using (the Menu button, followed by) the Launcher icon, followed by choosing my app.