• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

processing/processing-android-library-template: Processing Android Library Templ ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

processing/processing-android-library-template

开源软件地址(OpenSource Url):

https://github.com/processing/processing-android-library-template

开源编程语言(OpenSource Language):

CSS 36.5%

开源软件介绍(OpenSource Introduction):

These instructions will help you get started with developing a library for Processing Android using Gradle and Android Studio. The steps walk you through three main tasks:

  1. Configuring the build properties so that your library can be built and packaged by Gradle.
  2. Finding the library files produced by Gradle for use in Processing and redistribution.
  3. Setting up the debug project in Android Studio, which allows you to develop and debug your library using Android Studio as the programming environment.

NOTE: This template should be used as the starting point for a new library that uses Android-specific functions in the Android mode, or API from the Android platform. If your library only uses the regular Processing API and does not depend on any desktop-specific functionality or packages, you could use the regular Processing library template.

Prerequisites

The following components must be installed in order to go through the Usage Instructions.

Set Up and Compile

  1. Download and install Gradle following these instructions.
  2. Fork the template repository to use as a starting point.
  • Navigate to https://github.com/processing/processing-android-library-template in your browser.
  • Click the "Fork" button in the top-right of the page.
  • Once your fork is ready, open the new repository's "Settings" by clicking the link in the menu bar on the right.
  • Change the repository name to the name of your library and save your changes.
  • NOTE: GitHub only allows you to fork a project once. If you need to create multiple forks, you can follow these instructions.
  1. Checkout your fork of the template repository using your preferred git client.
  2. You can test if the template project can be built with Gradle by open a command line terminal, changing the directory to the repository location, and calling gradle dist. This should generarate a distribution folder with several files in it, including YourLibrary.zip. If this is the case, then you are ready to start working with the template to create your own library.
  3. Edit the resources/build.properties file to ensure the following fields are set correctly.
  • sketchbook.location is a quasi-optional field that should be set to the path of your Processing sketchbook folder. This field tells the Gradle build to deploy the library to the sketchbook/libraries path defined here (in addition to building a .zip distribution).
  • android_sdk.location should contain the path to the Android SDK in your computer. If you have used the Android mode before and let it to automatically download the SDK for you, then it will be inside the sketchbook/android/sdk folder, but here you can set any other location.
  • All of the fields in sections (4) and on are for metadata about your library.
  1. Also, make sure to edit the library medatata in resources/library.properties file.

After having compiled and built your project successfully, you should be able to find your library in Processing's sketchbook folder, examples will be listed in Processing's sketchbook menu. The Gradle build process also generates a zip package of your library for distribution.

Import to Android Studio

  1. Open Android Studio and select the "Import project" menu item in the welcome screen.
  2. Navigate to the location where you checked out the repository in your computer, and select the debug folder.
  3. Android Studio should be able to import the debug project automatically, which includes the library itself and a minimal test app.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap