I am developing a 2D game using Python 3.13.5 and Pygame. I’ve spent over a month trying to package it as an APK for Android, but faced unsolvable issues due to toolchain incompatibilities and network restrictions in my region (China).
Here is what I’ve tried:
Buildozer / python-for-android: Failed. The Pygame recipe is deprecated and incompatible with Python 3.13. It requires Cython < 3.0 and Python 3.10.
Kivy: I considered it, but it requires rewriting all my Pygame rendering and event loops.
Pygbag (WebAssembly): The local packaging succeeded (web.zip), but Pygbag’s official CDN (pygame-web.github.io) is blocked in China. My PC cannot download the WASM runtime cache, so it cannot be served locally to my mobile phone.
Chaquopy / Alde / AIDE: Doesn’t provide native SDL2 libraries required by Pygame.
Is there any up-to-date, practical workflow in 2026 to compile Pygame with Python 3.13 for Android without relying on blocked CDNs (like GitHub)? Or is Pygame truly dead for native Android packaging right now?
Any guidance or official roadmap on Pygame’s Android support would be highly appreciated.
You should use pygame-ce in place of pygame for Buildozer, since pygame is no longer developed. Though I’m not familiar with it, I found this gist that might help.
pygame-web.github.io is accessible for me inside China. It might be an inconsistent GFW block for *.github.io sites - you can try octocat.github.io. I haven’t seen this block for weeks but once it lasted several days.
I’m not familiar with the tools you tried and your objective so I can’t help with the other parts.
GitHub is not blocked, though it does have connection issues in China. VPN is the only reliable way I found to get around it. If possible you can use a mirror like gh.ddlc.top but it has tight rate limits per day because of the Cloudflare plan it uses.
GitHub Gists don’t work in China, here is the downloaded ZIP on a cloud host that should be accessible in China.
Thank you so much for taking the time to read my post and reply. I truly appreciate your kindness and your efforts to help, even though it seems the environment here makes things extremely difficult.
@jonathandung Thank you for the suggestion about pygame-ce. I actually tried using it before, but I ran into visual and scaling issues with my pixel art assets. More importantly, the core problem with Python 3.13 and Android packaging still remains a huge hurdle for me.
@mfile_bay Thank you for the detailed information about the network situation in China. You are absolutely right—GitHub and related CDN connections are extremely unstable here. I tried using mirrors to download the source code, but unfortunately, Pygbag still needs to fetch the WASM runtime from pygame-web.github.io, which frequently times out and gets blocked. I really appreciate your suggestions on mirrors and VPNs. If I ever get access to a stable proxy in the future, I’ll definitely give it another try.
To be honest, I have decided to take a break from trying to package this game for mobile/Web. After more than a month of struggling with toolchains, blocked CDNs, and environment issues, I’ve realized that the current network environment and the Python mobile ecosystem here just aren’t ready for what I’m trying to do.
Instead, I am going to focus on enjoying my game on PC with my friends via LAN (127.0.0.1 or local IP), which works perfectly!
Thank you all again for your help and for listening to my story. It means a lot to me. Have a great day!
If Pygbag doesn’t support customizing the URL / using a local file instead I think it might be a valid feature request for them. pip supports this and it is life-saving[1]. pip always times out when downloading PyQt from PyPI, so I enabled pip’s verbose output, got the .whl URL, put it into Free Download Manager (a faster, more stable downloader), then installed from the file pip install D:/path/to/PyQt-wheel.whl.
Similar frustration happened when I tried to compile a fork of Zed and had to wait maybe 10 minutes for webrtc-sys’s build script to download am artifact from GitHub.[2]
(If the site redirects to GitHub, a GitHub mirror might go unaffected and a GitHub proxy might circumvent the block to some extent, so changing the URL to them will help. If you can’t access them for some reason (I can access gh-proxy.com), you can still use Free Download Manager to get a connection to GitHub and download to local, which still probablistically fails to connect but connects much more stabily once connected)