This forum has been archived. Please start a new discussion on GitHub.

Problem with Android and Ice.jar

Hi everyone!

I'm newbie in Ice framework and I'm having problems launching an Android program with Ice.jar library.

The Android Lint tool shows me this message when I try to run my program:

Invalid package reference in library; not included in Android: Referenced from IceUtilInternal.FileLock.

Issue: Finds API accesses to APIs that are not supported in Android
Id: InvalidPackage

I am not sure if I'm doing somthing wrong. My environment is Ubuntu 12.04, Ice library 3.5.0 compiled by hand and downloaded from official site, Last Eclipse version with the Ice plugin and the Android 4.1.2

Thank you!!!


  • xdm
    xdm La Coruña, Spain
    Hi Carlos,

    Welcome to the forum. That seems like Ice.jar is not being exported. In your project build path configuration check that Ice.jar is in the expected location, and that is marked as exported in the "Order and Export" tab.

    If the Ice.jar isn't marked this could explain the issue. If you are using the 3.5.0 Slice2Java Eclipse plug-in this should be done automatically. You can check plug-in version you are using in "Help > About Eclipse > Installation Details" latest version is:
    Slice2Java Eclipse Plugin
  • Thank you for your response.

    I have the project with the Ice library configured correctly. It seem a problem inside the Ice.jar.

    The file uses the package and Android not supports this package.

    To avoid this problem, I have decrease the level of alert of the Android Lint from "Error" to "Warning" and now I'm able to run my program.
  • xdm
    xdm La Coruña, Spain
    Glad to hear you get it working, this class is not used by Android so shouldn't be any problems at run time.

    I see the problem if i manually run Lint from Android tools menu. But if i use the option "clear Lint markets" the project runs without problems.

    Thanks for reporting the issue.