Home Help Center

Problem with Android and Ice.jar

BuddyDroidBuddyDroid Member Carlos Espinosa PeralOrganization: UCLM (University Castilla la Mancha) SpainProject: PFC (Final Project Carreer)
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: java.lang.management. 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!!!

Comments

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    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	3.5.0.20130308	com.zeroc.Slice2Java.feature.group
    
  • BuddyDroidBuddyDroid Member Carlos Espinosa PeralOrganization: UCLM (University Castilla la Mancha) SpainProject: PFC (Final Project Carreer)
    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 FileLock.java uses the package java.lang.management.ManagementFactory 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.
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    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.
Sign In or Register to comment.