Accepted answer

now for the missing class problem.

i'm an eclipse java ee developer and have been in the habit for many years of adding third-party libraries via the "user library" mechanism in build path. of course, there are at least 3 ways to add a third-party library, the one i use is the most elegant, in my humble opinion.

this will not work, however, for android, whose dalvik "jvm" cannot handle an ordinary java-compiled class, but must have it converted to a special format. this does not happen when you add a library in the way i'm wont to do it.

instead, follow the (widely available) instructions for importing the third-party library, then adding it using build path (which makes it known to eclipse for compilation purposes). here is the step-by-step:

  1. download the library to your host development system.
  2. create a new folder, libs, in your eclipse/android project.
  3. right-click libs and choose import -> general -> file system, then next, browse in the filesystem to find the library's parent directory (i.e.: where you downloaded it to).
  4. click ok, then click the directory name (not the checkbox) in the left pane, then check the relevant jar in the right pane. this puts the library into your project (physically).
  5. right-click on your project, choose build path -> configure build path, then click the libraries tab, then add jars..., navigate to your new jar in the libs directory and add it. (this, incidentally, is the moment at which your new jar is converted for use on android.)


step 5 may not be needed, if the lib is already included in your build path. just ensure that its existence first before adding it.

what you've done here accomplishes two things:

  1. includes a dalvik-converted jar in your android project.
  2. makes java definitions available to eclipse in order to find the third-party classes when developing (that is, compiling) your project's source code.


put the source in a folder outside yourt workspace. rightclick in the project-explorer, and select "import..."

import the project in your workspace as an android project. try to build it, and make sure it is marked as a library project. also make sure it is build with google api support, if not you will get compile errors.

then, in right click on your main project in the project explorer. select properties, then select android on the left. in the library section below, click "add"..

the mapview-balloons library should now be available to add to your project..


go to build path in eclipse, then click order and export, then check the library/jar, and then click the up button to move it to the top of the list to compile it first.


error parsing xml: unbound prefix

resource '/playteddy/res' does not exist.

i got the above two errors and finally i solved it.

right click your project -> properties -> java build path -> googleadmobadsdk (select and put it top), then you run and problem solved. it is solved my runtime error.


first, the problem of the missing prefix.

if you consume something in your layout file that comes from a third party, you may need to consume its prefix as well, something like "droidfu:" which occurs in several places in the xml construct below:

<com.github.droidfu.widgets.webimageview android:id="@+id/webimage"

this comes out of the jar, but you'll also need to add the new "xmlns:droidfu"

<linearlayout xmlns:android=""

or you get the unbound prefix error. for me, this was a failure to copy and paste all of the supplied example from the third-party library's pages.


if you are using the adt version 22, you need to check the android dependencies and android private libraries in the order&export tab in the project build path


setting up a library project

a library project is a standard android project, so you can create a new one in the same way as you would a new application project.

when you are creating the library project, you can select any application name, package, and set other fields as needed, as shown in figure 1.

next, set the project's properties to indicate that it is a library project:

in the package explorer, right-click the library project and select properties. in the properties window, select the "android" properties group at left and locate the library properties at right. select the "is library" checkbox and click apply. click ok to close the properties window. the new project is now marked as a library project. you can begin moving source code and resources into it, as described in the sections below.


ensure that your 3rd party jars are in your projects "libs" folder and they will be put in the .apk when you package your application. you may see runtime errors on the device if something in the jar is not supported, but other than that i have had great success with this.

Related Query

More Query from same tag