Closed rayzchen closed 2 years ago
@rayzchen How did you get to install Android SDK and NDK
apt-get install wget curl unzip make openjdk-8-jdk -y
wget https://raw.githubusercontent.com/kivy/python-for-android/develop/ci/makefiles/android.mk
make -f android.mk
This downloads the makefile in ci/makefiles/android.mk
and runs it, which downloads both the NDK and SDK and sets them up in /root/.android/
ok, I will try that, this is really cool
On Sat, 23 Apr 2022 at 10:54, Ray Chen @.***> wrote:
apt-get install wget curl unzip make openjdk-8-jdk -y wget https://raw.githubusercontent.com/kivy/python-for-android/develop/ci/makefiles/android.mk make -f android.mk
This downloads the makefile in ci/makefiles/android.mk and runs it, which downloads both the NDK and SDK and sets them up in /root/.android/
— Reply to this email directly, view it on GitHub https://github.com/kivy/python-for-android/issues/2585#issuecomment-1107444350, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKB42IVFL5PLVSIE55FWRSLVGPCG7ANCNFSM5T4SZZTA . You are receiving this because you commented.Message ID: @.***>
@rayzchen just read the content of the file and I discovered that the NDK and SDK version it installed is for x86_64 bit archs and not aarch64. Which simply means p4a
is not supported on android phones with armeabi-v7a and aarch64
Ran same steps on a GitHub codespace yet it still tries to find toolchain for "aarch64-linux-android"
platform.platform()
is 'Linux-5.4.0-1074-azure-x86_64-with-glibc2.31'
Why does p4a say I have to specify an arch when the quick start doesn't?
python-for-android
should run on a instance that also Google supports with the build tools for Android. (Linux x86_64, macOS x86_64, macOS Apple Silicon).
This statement doesn't mean that you can't build for aarch64-linux-android
if you're on a x64_64 machine as all the builds for Android are cross-compiled (I'm referring to: "just read the content of the file and I discovered that the NDK and SDK version it installed is for x86_64 bit archs and not aarch64. Which simply means p4a is not supported on android phones with armeabi-v7a and aarch64") .
@rayzchen I've seen you're using the stable version of python-for-android
(the latest one available on PyPi), but you're also taking advantage of the android.mk
file from develop
branch: https://raw.githubusercontent.com/kivy/python-for-android/develop/ci/makefiles/android.mk
, which installs the NDK required by the develop
branch, not the master
one, which is incompatible.
Please let me know if using wget https://raw.githubusercontent.com/kivy/python-for-android/master/ci/makefiles/android.mk
instead of wget https://raw.githubusercontent.com/kivy/python-for-android/develop/ci/makefiles/android.mk
fixes your issue.
It seems to be fixed! Thanks for the help.
Checklist
p4a.branch = develop
)Versions
Description
I am trying to use Termux to build a PySDL2 app, but python-for-android doesn't seem to find a certain toolchain.
buildozer.spec
not used
Spec file:
not used
Commands
Fresh copy of termux Use Andronix to install Ubuntu 20.04 Command:
curl https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/repo-fix.sh > repo.sh && chmod +x repo.sh && bash repo.sh && pkg update -y && pkg install wget curl proot tar -y && wget https://raw.githubusercontent.com/AndronixApp/AndronixOrigin/master/Installer/Ubuntu20/ubuntu20.sh -O ubuntu20.sh && chmod +x ubuntu20.sh && bash ubuntu20.sh
Run these commands inside proot:
Some i386 installs don't work
In current directory I have
main.py
:Logs