Eclipse 在 DDMS 创建后初始化中挂起

发布于 2024-12-23 14:01:04 字数 240 浏览 2 评论 0原文

从最近两天开始,eclipse 开始表现出连线行为。它进入 DDMS post-create init 的无限进程,如果我尝试运行该应用程序,那么 Eclipse 就会挂起。 我尝试使用 eclipse 6.2 和 eclipse 7.0 从头开始​​安装,但没有成功。 还有其他人遇到这个问题吗,并找到了解决方案,请与我分享。

在此处输入图像描述

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.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(16

你如我软肋 2024-12-30 14:01:05

我的答案是这样的(如果您使用的是Windows)进入任务管理器并进入进程。您应该在进程(1 个或多个)中看到 adb.exe,如果有超过 1 个,请关闭较小的进程(大小约为 1mb),然后进入 eclipse 文件夹并关闭删除 .lock 文件。 (关闭 Eclipse 后)然后重新打开 Eclipse 即可。我认为发生这种情况是因为 adb 往往会挂起。

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.

百思不得你姐 2024-12-30 14:01:05

我尝试删除 .lock 文件并启动 eclipse -clean ,启动 Eclipse 并关闭“自动构建”...没有任何帮助。它在启动的各个部分一直锁定。

我的工作区中有大约 100 个不同的项目,结果发现罪魁祸首是我的 Android 项目之一,其中包含损坏的 AndroidManifest.xml 文件。不知何故,整个文件在文件中重复了:

    <?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>

我刚刚删除了重复的行,重新启动了 Eclipse,一切正常。

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.

黑寡妇 2024-12-30 14:01:05

我遇到了同样的问题,但我刚才解决了。

我使用 USB 扩展器将设备连接到 PC。有些设备通过它连接没有问题,但有些则不然。有些USB口甚至直接连接也会出现连接失败的情况!

对我来说的解决方案:
1.使用另一个USB端口,
2. 直接连接到USB端口,
3.重新启动设备和adb。

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.

智商已欠费 2024-12-30 14:01:05

我有同样的问题。下载了新的eclipse,新的工作区,仍然没有解决。最后,在几次退休后,我发现这是由于外部文件夹中的项目造成的。

例如。我使用 TFS 维护我的项目源代码控制,并说我的项目位于 C:/TFS/Proj1、C/TFS/Folder1/Proj2 等。在 Eclipse 工作区中,我曾经从现有源导入项目。

这是我所做的修复:

  1. 下载了新的 eclipse(可能删除 .lock 文件并启动
    eclipse 使用 -clean 我的工作,但我还没有尝试过)
  2. 在同名的新工作空间中创建新的空 Android 项目。 (创建新项目 Proj1、Proj2)
  3. 关闭 Eclipse
  4. 浏览到 Eclipse 工作区并删除项目目录 Proj1 和 Proj2 内的所有内容。
  5. 使用 TFS,将项目的最新源放入 Android 工作区的同一项目文件夹中。
  6. 启动日食。万岁,没有悬挂问题。

基本思想是,如果您将项目保留在工作区中,则不会出现此问题。

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:

  1. Downloaded new eclipse (maybe deleting .lock file and starting
    eclipse using -clean my work, but I haven't tried that)
  2. Create new empty Android projects in a new worksapce by the same name. (create new project Proj1, Proj2)
  3. close Eclipse
  4. Browse to Eclipse workspace and delete everything inside the project directories Proj1 and Proj2.
  5. Using TFS, get latest sources of the project into the same Project folder of android workspace.
  6. start eclipse. hurray, no hanging problem.

The basic idea is if you keep your projects in workspace, this problem will not arise.

雨巷深深 2024-12-30 14:01:05

它(eclipse挂起)也可能是因为adb默认端口(5037根据http:// /developer.android.com/tools/help/adb.html)已被另一台服务器使用。

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.

装迷糊 2024-12-30 14:01:05

当挂在 DDMS post-create init 中时,

  1. 转到 Project ->清理...
  2. 清理所有项目(立即开始构建。构建整个工作区)
  3. 重新启动 Eclipse

它对我有用。

While hanging in DDMS post-create init,

  1. Go to Project -> Clean...
  2. Clean all projects (Start a build immediately. Build the entire workspace)
  3. Restart Eclipse

It works for me.

晒暮凉 2024-12-30 14:01:05

对我来说,adb.exe 正在尝试监听正在使用的端口 5037
在我删除了正在使用它的程序后,我的生活变得更好了

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

洋洋洒洒 2024-12-30 14:01:05

我正在构建一个由 Unity3D 导出​​的 GoogleProject。以下对我有用(基于 user2698292 的回答):

平台:MacOS

  1. 杀死 adb 相关进程 (ps -ef |grep adb)
  2. cd .../.../Eclipse.app/Contents/MacOS
  3. 在终端中运行...。 /eclipse-clean-刷新

I am building a GoogleProject exported by Unity3D. Following works for me(based on answer from user2698292):

Platform: MacOS

  1. kill adb related processes (ps -ef |grep adb)
  2. cd .../.../Eclipse.app/Contents/MacOS
  3. run in terminal... ./eclipse -clean -refresh
生来就爱笑 2024-12-30 14:01:04

我遇到了这个问题,这是由于我的工作区的 .metadata 文件夹中存在文件 .lock 造成的。

我不知道这是否是您的问题,但是关闭 eclipse 并从工作区中删除 .metadata\.lock 文件对我有用。

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.

白衬杉格子梦 2024-12-30 14:01:04

我遇到了同样的问题,但使用了上述各种方法来解决它。对于我的项目,我将主项目存储在单独的文件夹中,并将测试项目存储在工作区中。 (别问我为什么,事情就是这样)。

我还运行了一个 adb 进程。

我的文件夹结构如下所示:

  • droid-project
    • .元数据

    .

      • .lock
  • 工作空间与测试项目
    • .元数据

    .

      • .lock

解决方案:

  1. 终止 Eclipse
  2. 终止 adb 进程 kill
  3. 删除两个 .lock 文件 rm .lock
  4. 重新启动 Eclipse

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:

  1. Kill Eclipse
  2. Kill the adb process kill <adb process #>
  3. Delete both .lock files rm .lock
  4. Restart Eclipse
冷情 2024-12-30 14:01:04

我解决了这个问题:

  1. 删除 .lock 文件
  2. 从 USB 上拔下我的手机。

I solved this:

  1. Deleting the .lock files
  2. Unplugging my phone from the USB.
咿呀咿呀哟 2024-12-30 14:01:04

什么对我有同样的麻烦(eclipse 3.7,ubuntu 11.10):

  1. 关闭/杀死eclipse
  2. 从.metadata中删除.lock文件,如kekoa所述
  3. 重新启动计算机
  4. 用“eclipse -clean”启动eclipse

What worked for me with the same trouble (eclipse 3.7, ubuntu 11.10):

  1. close/kill eclipse
  2. delete the .lock file from .metadata as mentioned by kekoa
  3. restart the computer
  4. start eclipse with "eclipse -clean"
银河中√捞星星 2024-12-30 14:01:04

对我有用的..

  1. 关闭 Eclipse
  2. 删除 ~/...workspace/.metadata/.lock
  3. 空垃圾
  4. 杀死 Eclipse 相关进程(ps -ef |grep eclipse 并杀死...)
  5. cd ~/...Eclipse.app/ Contents/MacOS 和..
  6. 在终端中运行..../eclipse -clean -refresh

What worked for me..

  1. close eclipse
  2. delete ~/...workspace/.metadata/.lock
  3. empty trash
  4. kill eclipse related processes (ps -ef |grep eclipse and kill...)
  5. cd ~/...Eclipse.app/Contents/MacOS and..
  6. run in terminal... ./eclipse -clean -refresh
少女七分熟 2024-12-30 14:01:04

我尝试了所有这些解决方案,但没有任何效果。

问题出在 Avast 防病毒软件中!我必须禁用它才能让 DDMS 工作(上面有提示)。
另外两天前我无法让 AVD 管理器工作,因为 avast 每次都会将其劫持到沙箱或其他东西中......

希望这会有所帮助

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

小红帽 2024-12-30 14:01:04

我的只需从 USB 拔出设备即可修复。

Mine was fixed just by unplugging the device from the USB.

夏有森光若流苏 2024-12-30 14:01:04

我在“欺骗”Eclipse 的 Android SDK 内容加载器后解决了这个问题:

  1. 关闭 Eclipse 并杀死所有相关进程
  2. 打开 Windows 资源管理器并将 Android SDK 文件夹重命名为其他任何内容(例如向其中添加“.bkp”) )
  3. 现在打开 Eclipse。转到 Java 视角(或 DDMS 以外的任何视角)。关闭所有有关找不到 Android SDK 路径的警告。
  4. 关闭 Eclipse(等待工作区保存过程完全完成)。
  5. 将 Android SDK 文件夹重命名回原来的名称。
  6. 重新打开 Eclipse。

I got around this after "cheating" the Eclipse's Android SDK content loader:

  1. Close Eclipse and kill all related process
  2. Open Windows Explorer and rename your Android SDK folder to anything else (e.g. add ".bkp" to it)
  3. Now open Eclipse. Move to Java perspective (or any perspective other than DDMS). Close any warnings about not finding Android SDK path.
  4. Close Eclipse (wait for the workspace saving process to fully complete).
  5. Rename your Android SDK folder back to its original name.
  6. Re-open Eclipse.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文