-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed as not planned
Labels
Description
Checklist
- the issue is indeed a bug and not a support request
- issue doesn't already exist: https://github.com/kivy/python-for-android/issues
- I have a short, runnable example that reproduces the issue
- I reproduced the problem with the latest development version (
p4a.branch = develop) - I used the grave accent (aka backticks) to format code or logs when appropriated
Versions
- Python: 3.10.5
- OS: Ubuntu Linux
- Kivy: Not used
- Cython: 0.29.30
- OpenJDK: 1.11.0
Description
I'm trying to make an SDL2 app. When I install the apk, the kivy loading screen shows and then it changes to landscape mode with a reduced resolution, then just stays as a black screen until the app is closed.
buildozer.spec
Not used
Command:
docker build -t testapp .
docker run -it testappSpec file:
Not used
Dockerfile:
FROM python:latest
RUN dpkg --add-architecture i386 && \
apt-get update && \
# apt-get install -y software-properties-common && \
# add-apt-repository "deb http://security.debian.org/debian-security stretch/updates main" && \
# apt-get update && \
apt-get install -y \
wget \
curl \
unzip \
make \
zip \
openjdk-11-jdk \
build-essential \
ccache \
git \
zlib1g-dev \
ant \
ccache \
autoconf \
libtool \
libssl-dev \
libncurses5:i386 \
libstdc++6:i386 \
zlib1g:i386 \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir git+https://github.com/kivy/python-for-android.git@develop pysdl2 pysdl2-dll cython
WORKDIR /root/app
RUN wget https://raw.githubusercontent.com/kivy/python-for-android/develop/ci/makefiles/android.mk
RUN make -f android.mk
RUN update-java-alternatives -s /usr/lib/jvm/java-1.11.0-openjdk-amd64/
COPY main.py .p4a .
RUN p4a create
CMD p4a apk \
--private . \
--package org.example.test \
--name "My application" \
--version 0.1.0
main.py:
import sdl2.ext
sdl2.ext.init()
window = sdl2.ext.Window("Hello World!", size=(960, 540))
sdl2.ext.draw.fill(window.get_surface(), (255, 0, 0))
window.show()
processor = sdl2.ext.TestEventProcessor()
processor.run(window)
sdl2.ext.quit()
.p4a file:
--bootstrap=sdl2
--requirements=python3,pysdl2
--arch arm64-v8a
--sdk-dir /root/.android/android-sdk
--ndk-dir /root/.android/android-ndk
Logs
// REPLACE ME: Paste the build output containing the error
// Keep the triple grave accent (a.k.a. backquote/backtick) to have the code formatted