Search code examples
androideclipsegoogle-playandroid-lvl

Why can't Eclipse auto-complete my added Android library?


I am trying to add the Android Licensing Library and I have followed three "tutorials" that are essentially the same. When I try to write the integrated classes and codes that reference classes from the library, Eclipse does not auto-import, auto-complete or compile the code.

Obviously, I am either not importing the library as a project correctly or not configuring my environment correctly or not configuring my hosting app project correctly.

Any clues what I am doing wrong?

What info would be useful to share to elicit some help?


Solution

  • It was the library project. I tried to make a general project then convert to Android

    File -> Android Tools -> Convert to Android Project
    

    Instead what is needed is to make an Android project from existing source and browse to the copy of the Market Licensing SDK; down to the folder "library" where you will see the Android.xml.

    Then open the Properties for the project, click on Android in the "filter" panel; then you should see the check box in the bottom half of the right-hand panel "(x) is Library"; check the box.

    NOTE: If you don't see the check-box (as I did not previously), then you did not setup the project correctly. Delete the project and start over.

    Then you can go to your Application Project and visit the same panel to include the library that is now defined in your workspace.