返回介绍

Ubuntu Platform Guide

发布于 2019-12-08 22:22:29 字数 2793 浏览 962 评论 0 收藏 0

Initial Release

Welcome to the initial release of Ubuntu platform support in Cordova. With this release, the focus is developing on an Ubuntu system and using the cross-platform workflow discussed in the Overview. This includes adding the Ubuntu platform to your project, adding standard Cordova plugins, and building and running apps for the Ubuntu platform.

Ubuntu SDK

You may also want to install the Ubuntu QtCreator development environment. See developer.ubuntu.com for more info. (The QtCreator SDK is not required to add Ubuntu platform support to your Cordova app.)

Ubuntu Runtime Platforms

Ubuntu is well known for its Desktop environment (for laptops, PCs and such). Ubuntu Touch extends the Ubuntu OS onto phones and tablets. Ubuntu runtime platforms have varying CPU architectures (x86, armhf, etc.). App and plugin code must be compiled appropriately. Support for this broad area is rapidly evolving in Ubuntu.

Latest Information

For the latest information on Cordova app support for Ubuntu runtime platforms, see wiki.ubuntu.com/Cordova.

Development Platform Requirements

For this initial release, the development platform should be an Ubuntu Desktop. Ubuntu 13.10 (codename ‘saucy’) or later is required to enjoy the full set of supported capabilities.

You can install Cordova on non-Ubuntu systems (using npm), but important capabilities are only provided through Ubuntu debian packages at this time.

Cordova Installation

Add the Ubuntu Cordova Personal Package Archive to your Ubuntu system:

$ sudo add-apt-repository ppa:cordova-ubuntu/ppa
$ sudo apt-get update

Install cordova-cli package (and its dependencies):

$ sudo apt-get install cordova-cli

Project Workflow

Create a project

Creates an app in a hello directory whose display name is HelloWorld:

$ cordova create hello com.example.hello HelloWorld

Move into the Project Directory

$ cd hello

Add the Ubuntu Platform

$ cordova platform add ubuntu

Build for Ubuntu

$ cordova build ubuntu

Run the App

$ cordova run ubuntu

Add the Camera Plugin

$ cordova plugin add cordova-plugin-camera
``

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文