Closed ivanadam closed 5 years ago
which target? (android, ios, other)
Android
Make sure you are using Kivy's master branch, or a recent commit. This will be done automatically if your python-for-android is up to date, try cleaning the .buildozer directory in your app dir and running buildozer again.
I'm not sure from the reports about this if there's still a bug with it, or if people are not realising they haven't deleted a cached Kivy from a previous build. If the problem persists after rebuilding everything, please post the log and the issue can be reopened.
I still got this problem. I set orientation to portrait but still got landscape in my phone. What I'm using is Kivy Complete VM - 0.7. My buildozer.spec file is:
[app]
title = dcc_xyz_md
package.name = dcc_xyz_md
package.domain = org.test
source.dir = .
source.include_exts = py,png,jpg,kv,atlas,ttf
version = 0.1
requirements = python3,kivy==1.11.1,kivymd,pymysql
requirements.source.kivy = /home/kivy/Repos/kivy/
orientation = portrait
#
#
#
osx.python_version = 3
osx.kivy_version = 1.10.1
#
#
fullscreen = 1
android.permissions = INTERNET
android.api = 27
android.minapi = 21
android.sdk = 28
android.ndk_path = /home/kivy/Android/android-ndk-r17c/
android.sdk_path = /home/kivy/Android/android-sdk-28/
android.arch = armeabi-v7a
#
#
p4a.source_dir = /home/kivy/Repos/python-for-android/
#
#
[buildozer]
log_level = 2
warn_on_root = 1
#
#
#
#
#
#
#
#
#
#
In case more people have this issue, I was able to resolve it by disabling the following line in android near the top of my main.py:
from kivy import platform
if platform != 'android':
Config.set('graphics', 'resizable', False) # Prevent window from being resized
There are probably other config or window manipulations in python that will interfere with the buildozer.spec setting, so try experimenting with disabling other related commands.
Versions
Description
Whether I set app orientation to landscape or portrait in the buildozer.spec file, the app is always built in landscape mode. How can I fix this issue?