我首先从https://github.com/kuri65536/python-for-android
获得SL4A的信息有sl4a的可安装APK - r6.1.1版本和python解释器 - r26版本。他们基本上是在 Android Nougat 上工作,但有些功能不起作用或看起来不稳定。
很高兴看到Google再次开发SL4A。
所以,我尝试从 Android Nougat 版本安装新的sl4a 7.0。我从https://android.googlesource.com/platform/external/sl4a/获得了源代码并制作了sl4a.apk
问题
sl4a 7.0不适用于当前的PythonForAndroid解释器 - r26。当我执行SL4A时 在设备上,崩溃正在发生。
这是logcat
AndroidRuntime: FATAL EXCEPTION: pool-1-thread-1
AndroidRuntime: Process: com.googlecode.android_scripting, PID: 22750
AndroidRuntime: java.lang.RuntimeException: java.lang.RuntimeException: Binary /data/user/0/com.googlecode.pythonforandroid/files/python/bin/python does not exist!
AndroidRuntime: at com.googlecode.android_scripting.SingleThreadExecutor.afterExecute(SingleThreadExecutor.java:32)
AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1141)
AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
AndroidRuntime: at java.lang.Thread.run(Thread.java:761)
AndroidRuntime: Caused by: java.lang.RuntimeException: Binary /data/user/0/com.googlecode.pythonforandroid/files/python/bin/python does not exist!
AndroidRuntime: at com.googlecode.android_scripting.interpreter.Interpreter.setBinary(Interpreter.java:118)
AndroidRuntime: at com.googlecode.android_scripting.interpreter.Interpreter.buildFromMaps(Interpreter.java:73)
AndroidRuntime: at com.googlecode.android_scripting.interpreter.InterpreterConfiguration$InterpreterListener.buildInterpreter(InterpreterConfiguration.java:173)
AndroidRuntime: at com.googlecode.android_scripting.interpreter.InterpreterConfiguration$InterpreterListener.addInterpreter(InterpreterConfiguration.java:119)
AndroidRuntime: at com.googlecode.android_scripting.interpreter.InterpreterConfiguration$InterpreterListener.-wrap0(InterpreterConfiguration.java)
AndroidRuntime: at com.googlecode.android_scripting.interpreter.InterpreterConfiguration$InterpreterListener$2.run(InterpreterConfiguration.java:101)
AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
实际上,python位于确切的目录中。此问题看起来像权限问题。 有人帮我解决这个问题吗?