在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):beeware/briefcase-android-gradle-template开源软件地址(OpenSource Url):https://github.com/beeware/briefcase-android-gradle-template开源编程语言(OpenSource Language):Java 86.7%开源软件介绍(OpenSource Introduction):Briefcase Android Gradle TemplateA Cookiecutter template for building Python apps that will run under Android. This repository branch contains a template for Python 3.11. Other Python versions are available by cloning other branches of repository. Using this templateThe easiest way to use this project is to not use it at all - at least, not
directly. Briefcase is a tool that
uses this template, rolling it out using data extracted from a
However, if you do want use this template directly...
If you've done this correctly, a project with a formal name of My Project/ app/ src/ main/ assets/ python/ app/ my_project/ __init__.py __main__.py (declares IPythonApp) app_packages/ ... cpp/ ... java/ ... res/ ... AndroidManifest.xml build.gradle proguard-rules.pro briefcase.toml build.gradle gradle.properties gradlew gradlew.bat settings.gradle You're now ready to run build and run your project! Set $ ./gradlew installDebug Next stepsOf course, running Python code isn't very interesting by itself - you'll be able to output to the console, and see that output in Gradle, but if you tap the app icon on your phone, you won't see anything - because there isn't a visible console on an Android. To do something interesting, you'll need to work with the native Android system libraries to draw widgets and respond to screen taps. The Rubicon Java bridging library can be used to interface with the Android system libraries. Alternatively, you could use a cross-platform widget toolkit that supports Android (such as Toga) to provide a GUI for your application. Regardless of whether you use Toga, or you write an application natively, the
template project will run the __main__ module associated with the app name
that you provided when you generated the tempalte. That Python code must
define an instance of If you have any external library dependencies (like Toga, or anything other
third-party library), you should install the library code into the
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论