-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on creating state machine builder on Android #29
Comments
👍 I like the philosophy of not creating that you don't need. |
Hi agrusha, thanks for let me knowing about this problem. I am not familiar with android, so I am not quite understand how Android would revive. Because ManagementService is still missing the java.lang.management package even I make instantiate StateMachineBuilder without involving java.lang.management package. It would be helpful if you can give me more information about this. And also it would be great if you can provide a pull request. |
Well... The actual crash appears to happen only at the moment when android tries to create the instance of ManagementService. As far as it is initiated during StateMachineBuilderImpl creation process it is inevitable that Android bumps into it and throws an exception. But if one makes the way not to initiate the ManagementService object if there is no need in it, then Android won't fall. |
Great, thanks! |
No, importing does not lead to crash, only trying to use unsupported classes directly |
It looks like it was resolved in 8074cec, I tried 0.3.4 release with this fix cherry-picked and it works for me. |
I've tried android sample project you've mentioned on your 'examples' page using the latest released squirrel library.
It crashes while trying to instantiate StateMachineBuilderImpl.
The reason is in following: java.lang.management API is not a part of Android (http://stackoverflow.com/questions/19595814/android-add-java-lang-management-api)
and that is why it can not instantiate managementService that requires a bunch of methods from this package.
As I can see, managementService is used only if it was directly declared in configuration.
So, probably, it is possible to make way to instantiate StateMachineBuilder without involving java.lang.management package. If so - it would allow to revive Android build. And that would be great indeed!
The text was updated successfully, but these errors were encountered: