我也存在同样的问题,最后通过在 Java写一个小的单州级班,从SL4A安装的SL4A安装中,用java.lang制作的分工艺中操作Adal-4-Android binary。 ProcessBuilder。 因此,我根本不使用SL4A机制(触发器、召唤等),只是借款。
This seems cleaner than trying to start and connect to a Python process through SL4A.
This is Python 2.7.1, cross-compiling extensions from Mac OS X Snow Leopard. My Python modules are doing only text input and output, accepting socket connections, etc. No interaction with the Android API. It all works fine: writing a Java stream to Python input and reading a Java stream to get Python output. C extensions are build using the P4A instructions . (Android could not find .so dynalibs until I added
[build_ext]
inplace=1
to setup.cfg during the build. I think this is because setup install is never invoked on the Android. I m just pushing with adb.
All the activity lifecycle states seem to be working, but I can t yet determine whether the sub-process is automatically suspended while the main process is in the stopped state.
如果有兴趣的话,我可以在几个星期内张贴法典。 (休假)
我的包装计划是将ZIP的档案存放在/资产中,并在首个Create时备注。 我没有这样做,但我并不期望有任何问题。