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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8677679/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:30:47  来源:igfitidea点击:

Eclipse Hangs in DDMS post-create init

androideclipseddms

提问by Pawan

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.

从最近两天开始,eclipse 开始显示有线行为。它进入 DDMS post-create init 的无限过程,如果我尝试运行该应用程序,那么 Eclipse 就会被挂起。我尝试使用 eclipse 6.2 和 eclipse 7.0 从头开始​​安装,但没有运气。有没有其他人面临这个问题,并有任何解决方案,然后请与我分享。

enter image description here

在此处输入图片说明

回答by Kekoa

I had this problem, it was due to the presence of the file .lockin the .metadatafolder of my workspace.

我有这个问题,这是由于该文件的存在.lock将在.metadata我的工作区的文件夹中。

I don't know if this is your problem, but closing eclipse and deleting the .metadata\.lockfile from your workspace, worked for me.

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

回答by c2knaps

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.

我还运行了一个 adb 进程。

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
  1. 杀死日食
  2. 杀死 adb 进程 kill <adb process #>
  3. 删除两个 .lock 文件 rm .lock
  4. 重启 Eclipse

回答by JesusS

I solved this:

我解决了这个:

  1. Deleting the .lock files
  2. Unplugging my phone from the USB.
  1. 删除 .lock 文件
  2. 从 USB 上拔下我的手机。

回答by laborg

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

遇到同样问题的方法对我有用(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"
  1. 关闭/杀死日食
  2. 从 .metadata 中删除 .lock 文件,如 kekoa 所述
  3. 重新启动计算机
  4. 用“eclipse -clean”启动eclipse

回答by user2698292

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
  1. 日食
  2. 删除 ~/...workspace/.metadata/.lock
  3. 清空垃圾桶
  4. 杀死 eclipse 相关进程(ps -ef |grep eclipse 和 kill...)
  5. cd ~/...Eclipse.app/Contents/MacOS 和..
  6. 在终端中运行... ./eclipse -clean -refresh

回答by Alexandre Bodi

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

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

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

回答by user1952049

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 hiHymaned it everytime into sandbox or something...

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

Hope this helps

希望这可以帮助

回答by birdman

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

我的问题是通过从 USB 上拔下设备来修复的。

回答by AWT

I tried deleting the .lockfiles and launching eclipse -clean, started eclipse with "Build Automatically" turned off...nothing helped. It kept locking up at various parts of the startup.

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

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:

我的工作区中有大约 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>

I just deleted the duplicate lines, restarted Eclipse, and everything worked OK.

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

回答by Raigex

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.

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