{"id":488,"date":"2024-05-12T16:13:39","date_gmt":"2024-05-12T16:13:39","guid":{"rendered":"https:\/\/techris.in\/?p=488"},"modified":"2024-06-20T22:45:53","modified_gmt":"2024-06-20T22:45:53","slug":"python-to-android-app-in-5-steps","status":"publish","type":"post","link":"https:\/\/techris.in\/python\/python-to-android-app-in-5-steps.html","title":{"rendered":"Python to android App in 5 steps"},"content":{"rendered":"

Here are the 5 steps to convert your python code to an android apk<\/p>\n

    \n
  1. Write and test your python code in desktop pc<\/li>\n
  2. Run the following command
    \np4a apk –private [dir location] –package org.techris.kmd –name “Custom name” –version 24.05.10 –bootstrap sdl2 –requirements python3==3.11.2,kivy,kivymd –sdk-dir [SDK installation location] –ndk-dir [ndk installation location] –android-api 34 –ndk-api 24 –arch armeabi-v7a –arch arm64-v8a –arch x86_64 –permission INTERNET –icon [location of your logo] –presplash [location of your logo] –presplash-color “#CA2D2A” –debug<\/li>\n<\/ol>\n

    Replace the items within the brackets [] to suit your needs<\/p>\n

    \"Do<\/a>
    Do you need help in python app development<\/figcaption><\/figure>\n

    Our command is<\/p>\n

    p4a apk –private $dir –package org.techris.kmd –name “KivyMD recipe Tutorial” –version 24.05.10 –bootstrap sdl2 –requirements python3==3.11.2,kivy,kivymd –sdk-dir \/home\/gk\/Android\/Sdk –ndk-dir \/home\/gk\/Documents\/android-ndk-r25b-linux\/android-ndk-r25b –android-api 34 –ndk-api 24 –arch armeabi-v7a –arch arm64-v8a –arch x86_64 –permission INTERNET –icon \/home\/gk\/Documents\/logo.png –presplash \/home\/gk\/Documents\/logo.png –presplash-color “#CA2D2A” –debug<\/p>\n

    3. APK is built now. Make sure that the apk is present in your folder where you executed this command
    \n4. Install the apk in your phone
    \nAbove command will build the apk for the following android architectures
    \narmeabi-v7a
    \narm64-v8a
    \nx86_64
    \n5. Open the App now in your android phone<\/p>\n

    This is how you can convert your python code to an android apk in 5 steps<\/p>\n