From last two days, eclipse started showing wired behaviour. Its goes in infinte process of DDMS post-create init, And if i try to run the application then Eclipse got hanged. I have tried to install from scratch with eclipse 6.2 and eclipse 7.0, but No luck. Is anybody else facing this problem, and got any solution then please share with me.
-
Right now Windows 7 Professional. For Linux I have some other problems, which are fixed for now. I am working on Android for about 1.5 yrs but never face such a worst situation. It seems that there is some problem in Android SDK or SDK-platoform tools after update of 16 and 10 respectively. – Pawan Dec 30 '11 at 09:01
-
Dependencies: Eclipse Helios (Version 3.6) or higher is required for ADT 16.0.0. ADT 16.0.0 is designed for use with SDK Tools r16. If you haven't already installed SDK Tools r16 into your SDK, use the Android SDK Manager to do so. – Padma Kumar Dec 30 '11 at 09:05
-
All already done number of times.. I know all these stuff... – Pawan Dec 30 '11 at 09:18
16 Answers
I had this problem, it was due to the presence of the file .lock
in the .metadata
folder of my workspace.
I don't know if this is your problem, but closing eclipse and deleting the .metadata\.lock
file from your workspace, worked for me.

- 27,892
- 14
- 72
- 91
-
2Its not working for me After delete this file. it will create automatically again – user1089679 Jan 25 '12 at 07:37
-
2@Kekoa Yes this has solved the problem +1 for solution. But do you know why the error came ? – Relsell Sep 12 '12 at 03:55
-
@relsell I don't know for sure. My guess is probably some defunct eclipse process crashed without removing the .lock file, so another eclipse instance couldn't read the metadata until that lock was released. – Kekoa Sep 12 '12 at 14:59
-
1I follow the process to kill eclipse, remove the .metadata/.lock file, kill all adb processes and restart eclipse with -clean, but Eclipse still locks up pretty soon after I open the DDMS or Logcat perspective. Looks like I'm stuck running "adb logcat | grep" in a terminal window... :-( – karora Jan 03 '13 at 10:55
I was having the same issue, but used a variety of the methods above to fix it. For my project, I have the main project stored in a separate folder, and my test project in the workspace. (Don't ask me why, that's just how it is).
I also had an adb process running.
My folder structure looks like:
- droid-project
- .metadata
- .lock
- workspace-with-test-projects
- .metadata
- .lock
Solution:
- Kill Eclipse
- Kill the adb process
kill <adb process #>
- Delete both .lock files
rm .lock
- Restart Eclipse

- 1,817
- 17
- 23
-
-
This worked except there was 1 final step. I had to empty my trash (Mac) or Eclipse would continue to hang. – Andrew Feb 25 '14 at 16:06
-
- Edit the `eclipse.ini` file located in your Eclipse install directory and insert `-clean` as the first line. – Iman Marashi Sep 25 '15 at 16:54
I solved this:
- Deleting the .lock files
- Unplugging my phone from the USB.

- 1,645
- 1
- 18
- 31
-
1I totally forgot I had a test device connected to the USB port. Unplugging it solved my Eclipse start-up issue. Thanks for the heads up. – AlxDroidDev Jul 10 '16 at 14:26
What worked for me..
- close eclipse
- delete ~/...workspace/.metadata/.lock
- empty trash
- kill eclipse related processes (ps -ef |grep eclipse and kill...)
- cd ~/...Eclipse.app/Contents/MacOS and..
- run in terminal... ./eclipse -clean -refresh

- 31
- 1
What worked for me with the same trouble (eclipse 3.7, ubuntu 11.10):
- close/kill eclipse
- delete the .lock file from .metadata as mentioned by kekoa
- restart the computer
- start eclipse with "eclipse -clean"

- 851
- 5
- 7
-
1Thanks, "eclipse -clean" worked for me without restarting my computer (on OSX). – pestrella Aug 29 '12 at 13:46
I tried all of these solutions and nothing worked.
The problem was in Avast antivirus! I had to disable it to get DDMS to work(with tips above). Also two days before i couldnt get AVD manager to work because avast hijacked it everytime into sandbox or something...
Hope this helps

- 21
- 1
I got around this after "cheating" the Eclipse's Android SDK content loader:
- Close Eclipse and kill all related process
- Open Windows Explorer and rename your Android SDK folder to anything else (e.g. add ".bkp" to it)
- Now open Eclipse. Move to Java perspective (or any perspective other than DDMS). Close any warnings about not finding Android SDK path.
- Close Eclipse (wait for the workspace saving process to fully complete).
- Rename your Android SDK folder back to its original name.
- Re-open Eclipse.

- 344
- 2
- 12
My answer is this (if you are using windows) Go into task manager and into processes. you should see adb.exe in processes (1 or more) if there is more than 1 turn off the smaller one (around 1mb in size) then go into eclipse folder and turn off delete the .lock file. (after turning off eclipse) then just turn eclipse back on. I think this happens because the adb tends to hang.

- 1,205
- 12
- 32
I tried deleting the .lock
files and launching eclipse -clean
, started eclipse with "Build Automatically" turned off...nothing helped. It kept locking up at various parts of the startup.
My workspace has about 100 different projects in it, turns out the culprit was one of my Android projects with a corrupt AndroidManifest.xml file. Somehow, the entire thing got duplicated within the file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.testapp.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.testapp.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I just deleted the duplicate lines, restarted Eclipse, and everything worked OK.

- 3,657
- 5
- 32
- 60
I got the same problem, but I solved it a moment ago.
I connect my device to PC with a USB extender. Some devices connect through it without problem, but some not. Even connecting to some USB ports directly will let connection fail!
The solutions for me: 1. use another USB ports, 2. connect to the USB ports directly, 3. restart the device and adb.

- 812
- 1
- 16
- 27
It (eclipse hangs) can be also because of the adb default port (5037 according to http://developer.android.com/tools/help/adb.html) is already used by another server.

- 4,249
- 18
- 28
While hanging in DDMS post-create init,
- Go to Project -> Clean...
- Clean all projects (Start a build immediately. Build the entire workspace)
- Restart Eclipse
It works for me.

- 3,693
- 2
- 26
- 30
For me it was the adb.exe is trying to listen to the port 5037 which was in use after i deleted the program which was using it my life just got better

- 319
- 2
- 8
I am building a GoogleProject exported by Unity3D. Following works for me(based on answer from user2698292):
Platform: MacOS
- kill adb related processes (ps -ef |grep adb)
- cd .../.../Eclipse.app/Contents/MacOS
- run in terminal... ./eclipse -clean -refresh

- 11
- 4
I had the same issue. Downloaded new eclipse, new workspace, still no solution. Finally after several retires I found out it is due to projects in external folders.
Eg. I maintain my project source control using TFS and say my projects are located at C:/TFS/Proj1, C/TFS/Folder1/Proj2 etc. In eclipse workspace I used to import project from existing source.
This is the fix I did:
- Downloaded new eclipse (maybe deleting .lock file and starting eclipse using -clean my work, but I haven't tried that)
- Create new empty Android projects in a new worksapce by the same name. (create new project Proj1, Proj2)
- close Eclipse
- Browse to Eclipse workspace and delete everything inside the project directories Proj1 and Proj2.
- Using TFS, get latest sources of the project into the same Project folder of android workspace.
- start eclipse. hurray, no hanging problem.
The basic idea is if you keep your projects in workspace, this problem will not arise.