problems deploying to android

Chipmunk2D Bindings for the Unity3D engine
Post Reply
David Kalina
Posts: 24
Joined: Thu Sep 09, 2010 10:22 am
Contact:

problems deploying to android

Post by David Kalina »

Tried deploying to Android after my initial Chipmunk-Unity integration and things seemed immediately and obviously broken. The log gives me endless spam along these lines

Code: Select all

E/Unity   ( 8163): Unable to find Chipmunk
I/Unity   ( 8163): DllNotFoundException: Chipmunk
I/Unity   ( 8163):   at (wrapper managed-to-native) ChipmunkBinding:ChipmunkRegisterInternalCalls ()
I/Unity   ( 8163):   at ChipmunkBinding..cctor () [0x00000] in <filename unknown>:0 
I/Unity   ( 8163): Rethrow as TypeInitializationException: An exception was thrown by the type initializer for ChipmunkBinding
I/Unity   ( 8163):   at ChipmunkBody.Awake () [0x00000] in <filename unknown>:0 
Something I'm supposed to do to get it working that I'm not aware of?

Thanks,
David
David Kalina
Posts: 24
Joined: Thu Sep 09, 2010 10:22 am
Contact:

Re: problems deploying to android

Post by David Kalina »

Actually also not able to deploy to iOS (at all). Xcode gives me a ton of linker errors along the lines of:

Code: Select all

Undefined symbols for architecture armv7:
  "_cpSpaceUseSpatialHash", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
And so forth. Which makes sense -- I am guessing I need to inform something in the build process that it needs to link the iOS static library. But I've never done this before with Unity so I'm not sure where this is supposed to happen.
David Kalina
Posts: 24
Joined: Thu Sep 09, 2010 10:22 am
Contact:

Re: problems deploying to android

Post by David Kalina »

Think I figured it out (at least I have iOS working and Android will probably work too, but it takes 30+ minutes to switch platforms which is mega stupid).

Needed to move libChipmunk-iPhone.a into a folder called Assets/Plugins/iOS (in the .unitypackage it's in Assets/Plugins/Chipmunk2D/iOS).

I also completely missed Assets/Plugins/Android/libChipmunk.so when merging from my Chipmunk-only project to my game project, so that's almost certainly the deployment issue there. Will test that later today hopefully.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: problems deploying to android

Post by slembcke »

Are you using the latest 1.0.2 version? http://chipmunk-physics.net/downloads.php

That was an issue in one of the earlier versions. We cleaned up the plugins directory so it didn't have Chipmunk stuff strewn all over in it. Moving the iOS and Android subdirs was a mistake that we didn't catch because we didn't try rebuilding for all the platforms. (facepalm)
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests