You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Async image works well on my LinuxMint 32-bit, but fails to load on my Android device.
The permissions in the Builder.spec file has been written as INTERNET but in the deployed apk, it does mention any other permissions other than "Read and modify contents of SD card"!
My code
`from kivy.app import App
from kivy.uix.gridlayout import GridLayout
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.uix.image import Image, AsyncImage
Builder.load_string("""
<screen1>:
Calcu:
rows:6
id: calculator
display: entry
BoxLayout:
TextInput:
id: entry
BoxLayout:
Button:
text:"7"
on_press: entry.text += self.text
font_size:32
Button:
text:"8"
on_press: entry.text += self.text
font_size:32
Button:
text:"9"
font_size:32
on_press: entry.text += self.text
Button:
font_size:32
text:"+"
on_press: entry.text += self.text
BoxLayout:
Button:
font_size:32
text:"4"
on_press: entry.text += self.text
Button:
font_size:32
text:"5"
on_press: entry.text += self.text
Button:
font_size:32
text:"6"
on_press: entry.text += self.text
Button:
font_size:32
text:"-"
on_press: entry.text += self.text
BoxLayout:
Button:
font_size:32
text:"1"
on_press: entry.text += self.text
Button:
font_size:32
text:"2"
on_press: entry.text += self.text
Button:
font_size:32
text:"3"
on_press: entry.text += self.text
Button:
font_size:32
text:"*"
on_press: entry.text += self.text
BoxLayout:
Button:
font_size:32
text:"0"
on_press: entry.text += self.text
Button:
font_size:32
text:"."
on_press: entry.text += self.text
Button:
font_size:32
text:"="
on_press: calculator.calculate(entry.text)
Button:
font_size:32
text:"/"
on_press: entry.text += self.text
BoxLayout:
Button:
text:"AC"
on_press: entry.text = ""
Button:
text: "Credits"
on_release: root.manager.current = 'screen2'
size_hint: 0.2, 1
<screen2>:
FloatLayout:
Label:
text: " This is my way of greeting you on this day, the occasion of your birthday!!.May joy, peace, happiness and sucess be with you forever."
pos_hint: {"x":0.0, 'y':0.1}
font_size: 25
size_hint_y: None
text_size: self.width, None
height: self.texture_size[1]
Button:
text: "get back!!"
on_release: root.manager.current = 'screen1'
size_hint: 0.2, 0.1
pos_hint:{"x":0.35, 'y':0}
AsyncImage:
source: 'http://i.imgur.com/****.png'
## I know the right URL I dont wanna reveal it
pos_hint: {"x":0, 'y':0.1}
""")
class screen1(Screen):
pass
class screen2(Screen):
pass
class Calcu(GridLayout):
def calculate(self,calculation):
if calculation:
try:
self.display.text = str(eval(calculation))
except Exception :
self.display.text = "Error"
sm = ScreenManager()
sm.add_widget(screen1(name="screen1"))
sm.add_widget(screen2(name="screen2"))
class main(App):
def build(self):
return sm
main().run()
The issue is that, the Kivy or Kivymd module added to your apk distribution is a version that has issues, make sure you place the master branch requirement for kivymd in the spec file in your requirements,
Then, AsyncImage sometimes needs to be under and Image class or from an Image object class, so that will help the program to understand, your are trying to display an image:
class Image45(IconLeftWidget):
pass
Kv = """
:
AsyncImage:
source: root.url #this should be an url
My code
My Buildozer.spec is located at http://dpaste.com/3F9WGSX
I tried adding "openssl" also to the permissions but the app crashed when deployed
Any Help would be appreciated!
The text was updated successfully, but these errors were encountered: