Skip to content Skip to sidebar Skip to footer

App Works Well On Windows In Python2 & Python3, But Receiving Error : Failed To Import Android, And Button Unresponsive

This is an app written in python 2.7 using kivy and numpy modules. I have installed buildozer by following steps in this link : https://github.com/kivy/buildozer , i did not do sud

Solution 1:

Failed to import "android" module.

This msg has nothing to do with image. It's won't affect your project if you don't use android module explicitly. All you need to do to avoid this line in logs is to add android to requirements inside buildozer.spec.

Error reading file .\logo_example1.png

This error indicates that image can't be found. I don't know what's problem with .\\logo_example1.png, but it's better just to use absolute path's and forget about problems.

import os

root_dir = os.path.dirname(os.path.abspath(__file__))
img_rel = 'logo_example1.png'
img_abs = os.path.join(root_dir, img_rel)

print(img_abs)

Upd:

Problem with pressing is related to this line - Window.size = (600, 700). Remove it and everything will work.

Looks like changing Window.size somehow breaks kivy touch point detection. If you want to change window size on Windows, use Config or wrap Window.size changing with platform check.


Post a Comment for "App Works Well On Windows In Python2 & Python3, But Receiving Error : Failed To Import Android, And Button Unresponsive"