.Apk size when encoding with kivy compared to that in Java

I just created apk after creating the application in kivy, but it seems to me that the size of the created apk is really large on android, and after the application starts, the size becomes larger. See the example below:

  • The code for this example .apk is a minimal Hello World application. Code below:

import kivy kivy.require ('1.0.6')

from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.button import Button

class MyApp(App):
    def build(self):
        return Button(text='Hello world')


if __name__ == '__main__':
    MyApp().run()
  • Size of this file corresponding to the above code: 1 kb

  • When creating your apk using python for an android project with steps of its size (6.7 MB): 3.1./distribute.sh -m "kivy" 3.2./build.py --dir / home / kivy / HelloWorld / - package org .ex.helloworld --name "HelloWorld" --icon / home / kivy / Work / HelloWorldDistribute / a.png --version 1.3 - - orientation portrait debug installd

kivy @kivy-VirtualBox: ~/android/python-for-android/dist/first/bin $du -h HelloWorld-1.3-debug.apk 6.7M HelloWorld-1.3-debug.apk

  • Android- s3 sroid :

    4.1 adb install -r HelloWorld-1.3-debug.apk 421 / (6996727 16.208 ) pkg:/data/local/tmp/HelloWorld-1.3-debug.apk

Android: 10.5

  • 1 , , 24.11

, Android, kivy, 10,5 ? , Java? kivy ? - ?

+4
1

Android Kivy Python, Kivy Python libs, Kivy 5-6 , , , , . Python, .

, apk, , .

, .

+4

Source: https://habr.com/ru/post/1539211/


All Articles