Search code examples
javaandroidlinuxubuntueclipse-luna

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


I wanted to start an Android application project using Eclipse.

My OS is Ubuntu 14.04 and had already the Android SDK. So far, I was using the command line tools.

I downloaded and installed Eclipse Luna (the ADT bundle comes with an older version of Eclipse, so I did not want to use it). Then, using Help -> Install New Software, installed the Android Eclipse plug-in (the instructions are here.

As per the instructions on Android developer site, I created an application project and tried to run the app on an emulator instance.

But the app did not run, and the Error Log in Eclipse showed the error

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

The hprof-conv file exists in the shown location, and I was able to run it.

/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.

After looking at different questions here (this, this, this, and this), I tried several things: restarting Eclipse, updating the SDK using the SDK manager, confirming that the settings at Window -> Preferences -> Android are correct, ensuring emulator screen is unlocked, etc.

All the settings everything is fine. But the problem persisted. Eclipse could not load the app on the emulator.

Another thing to note is that the posts on stack overflow and other sites that dealt with the similar problem were primarily on Windows.

I am puzzled. What am I missing or doing wrong?


Solution

  • Looks like the problem occurred because adb server was not running. I ran the command

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

    And then ensured that the emulator is detected by adb:

    $ adb devices
    List of devices attached 
    emulator-5554   device
    

    Then I went to Eclipse again, and tried to run the app by using Run As -> Android Application

    After a few seconds, voila, the emulator showed my app! :-) Problem solved. Hope this helps someone that has the same problem.