【问题标题】:DDMS files not found /opt/android-sdk-linux/platform-tools/hprof-conv ubuntu未找到 DDMS 文件 /opt/android-sdk-linux/platform-tools/hprof-conv ubuntu
【发布时间】:2015-02-03 13:32:57
【问题描述】:

我想使用 Eclipse 启动一个 Android 应用程序项目。

我的操作系统是 Ubuntu 14.04,并且已经安装了 Android SDK。到目前为止,我使用的是命令行工具。

我下载并安装了 Eclipse Luna(ADT 捆绑包带有旧版本的 Eclipse,所以我不想使用它)。 然后,使用Help -> Install New Software,安装了Android Eclipse插件(说明为here。

根据 Android 开发者网站上的instructions,我创建了一个应用程序项目并尝试在模拟器实例上运行该应用程序。

但应用程序没有运行,Eclipse 中的错误日志显示错误

 DDMS files not found:  /opt/android-sdk-linux/platform-tools/hprof-conv

hprof-conv 文件存在于所示位置,我能够运行它。

/opt/android-sdk-linux/platform-tools$ ./hprof-conv --help
Usage: hprof-conf infile outfile

Specify '-' for either or both to use stdin/stdout.

Copyright (C) 2009 The Android Open Source Project

This software is built from source code licensed under the Apache License,
Version 2.0 (the "License"). You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

See the associated NOTICE file for this software for further details.

在这里查看不同的问题(this、this、this 和this)后,我尝试了几件事:重新启动 Eclipse,使用 SDK 管理器更新 SDK,确认 @ 处的设置987654330@是正确的,确保模拟器屏幕解锁等。

所有设置都很好。 但问题依然存在。 Eclipse 无法在模拟器上加载应用程序。

另外需要注意的是,堆栈溢出和其他处理类似问题的网站上的帖子主要是在 Windows 上。

我很困惑。我错过了什么或做错了什么?

【问题讨论】:

    标签: java android linux ubuntu eclipse-luna


    【解决方案1】:

    我认为这个问题与 android 推出的新更新有关。

    只需按照以下步骤操作

    (您可能需要卸载旧的 ADT 插件)

    1) 转到 Eclipse -> 帮助 -> 安装新软件

    2) 在出现的下一个窗口中单击添加

    3) 在 Add repository windows 中输入 ADT Plugin for Name & https://dl-ssl.google.com/android/eclipse/ (不要省略 https 中的 s,这很重要)。点击确定*

    4) 单击确定后,您将在可用软件下看到开发人员工具。选择开发者工具,点击下一步,直到安装developer 23.0.0

    5) 重启 Eclipse,瞧!所有错误都消失了

    【讨论】:

    【解决方案2】:

    看起来问题是因为 adb 服务器没有运行。 我运行了命令

    $ adb start-server
    adb server is out of date.  killing...
    * daemon started successfully *
    

    然后确保模拟器被adb检测到:

    $ adb devices
    List of devices attached 
    emulator-5554   device
    

    然后我又去了 Eclipse,并尝试使用 Run As -> Android Application 运行应用程序

    几秒钟后,瞧,模拟器显示了我的应用程序! :-) 问题解决了。希望这可以帮助遇到同样问题的人。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多