Home Help Center

Trouble getting started with Android

duckjonesduckjones Member Dennis PelhamOrganization: PersonalProject: Home Automation controller
Hi there, I'm trying to build a simple Ice-enabled app in Eclipse that targets the Android 4.0 SDK. Every time I run my application, it bombs out with an error "unable to resolve static method 27: LIce/Util;.initialize()LIce/Communicator". I'm not sure why it's having issues here, I enabled the Eclipse plug-in and everything was wired up just fine. I have full intellisense (is that a Microsoft-only term? Not sure what the Eclipse equivalent is yet), so I'm sure that must mean the classpath is valid and Eclipse can see Ice.jar just fine.

I can't seem to find any Android samples in my install directory. Can anyone provide a link for me to download a sample so I can see if I can stumble my way through what I'm doing wrong?



  • duckjonesduckjones Member Dennis PelhamOrganization: PersonalProject: Home Automation controller
    More background info:
    I'm running Eclipse 4.2.0 on Windows 7 and Mac OS X Mountain Lion. I've downloaded the latest plugins and I'm running Ice 3.4.2. I've gotten the identical error on both Windows and Mac, and a very similar error when I finally found the Android demos and tried running the "HelloWorld" app. My Ice.jar seems properly linked in the Java Build Path and I get full code completions when I'm typing out objects from both the Ice package and the generated package that contains my slice types. slice2java has been autogenerating all my slice files properly. I just get a failure when I try debugging the app, it can't seem to find a reference to Ice.Util.initialize().

    Here's a basic snapshot of my source code:
    private Ice.Communicator _communicator;
    private Ice.ObjectAdapter _adapter;
        public void onStart() {
        	InitCommunications();	// TODO: Figure out where in the lifecycle this needs to be run
    private void InitCommunications() {
        	String[] args = new String[0];
        	_communicator = Ice.Util.initialize(args);
        	_adapter = _communicator.createObjectAdapterWithEndpoints("WishFullThinkingAndroidEndPoint", "default -p 8087");
        	Ice.Object iceObject = new RPCClient(this);
        	_adapter.add(iceObject, _communicator.stringToIdentity("WishFullThinkingAndroidClient"));
Sign In or Register to comment.