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.
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.
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:
- Kill Eclipse
- Kill the adb process
kill <adb process #>
- Delete both .lock files
- Restart Eclipse
I solved this:
- Deleting the .lock files
- Unplugging my phone from the USB.
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”
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
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
Mine was fixed just by unplugging the device from the USB.
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.
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.
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.
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.
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.
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.
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.
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
I am building a GoogleProject exported by Unity3D. Following works for me(based on answer from user2698292):
- kill adb related processes (ps -ef |grep adb)
- cd …/…/Eclipse.app/Contents/MacOS
- run in terminal… ./eclipse -clean -refresh