Need to compile a youtube downloader to an android apk.

27 views
Skip to first unread message

Arpit Goyal

unread,
Nov 30, 2015, 1:03:56 AM11/30/15
to Kivy users support
I have a Youtube Downloader at a very basic level, which lets me download music/video/music-video/ off youtube. It has a GUI which is built using PyQT4. It also uses the "wget" which is an ubuntu tool for opening multiple connections while downloading. Also it uses the library youtube_dl. I need to compile the package into an apk. I use the following command as mentioned in the documentation, but I am unsure about how to use bootstrap and specify the requirements. Since it has some os requirements also like wget, how am I supposed to use it in the android package.

python-for-android --sdk-path=~/android-sdk-linux/tools/ apk --private ~/Youtube-Downloader/ --package=org.example.fastYoutubeDownloader --name="Fast Youtube Downloader" --version=0.1 --bootstrap={} --requirements={} --dist_name=YoutubeDownloader

I do not specify the bootstrap argument and specify the requirements as {sdl,python2,youtube_dl} and I get the error: Obviously this error is telling me there are no android api available. What is the requirement here I need to specify.

[INFO]:    Android API target was not set manually, using the default of 15
[INFO]:    Available Android APIs are ()

Kindly help me with the process. The github url for the project is: https://github.com/arpitgoyalhtmedia/UI_youtube_downloader

Alexander Taylor

unread,
Nov 30, 2015, 7:30:51 AM11/30/15
to Kivy users support
I doubt you'll be able to use wget on android as standard, though you might be able to with busybox or something. An alternative that would certainly work would be to use python modules for this purpose, such as requests.

The android api error means that your android sdk has no api platform tools installed. You can install them by running the 'android' command from the sdk and selecting some. They'll be available for most/all apis, but in the absence of any other factors you can just pick those from the default of 15.

Are you actually putting the requirements in {} braces? Don't do that, it's the wrong syntax, and don't include the bootstrap argument if you don't set it.

What kind of gui are you actually aiming for here, are you aware that there isn't a pyqt backend in p4a?
Reply all
Reply to author
Forward
0 new messages