SL4A, PythonForAndroid and Android 7.0 Nougat

I have information for SL4A first from https://github.com/kuri65536/python-for-android

  • SL4A: sl4a-r6.1.1-arm-debug.apk
  • PY4A: PythonForAndroid-debug.apk

There are installable APKs for version sl4a-r6.1.1 and the python interpreter is version r26. They work mainly on Android Nougat , but some functions do not work or look a little unstable.

Good thing Google is developing the SL4A again.

So, I tried to install the new version of sl4a 7.0 from Android Nougat . I got the source codes from https://android.googlesource.com/platform/external/sl4a/ and made sl4a.apk

Problem

sl4a 7.0 does not work with the current PythonForAndroid interpreter - r26. When I execute SL4A, the device crashes.

Here is 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)

In fact, python is in the exact directory. This issue looks like a resolution issue. Anyone help me solve this problem?

+4
source share

Source: https://habr.com/ru/post/1662354/


All Articles