欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

ionic框架配置-創(chuàng)新互聯(lián)

ionic簡(jiǎn)介

ionic是一個(gè)專(zhuān)注于用WEB開(kāi)發(fā)技術(shù),基于HTML5創(chuàng)建類(lèi)似于手機(jī)平臺(tái)原生應(yīng)用的一個(gè)開(kāi)發(fā)框架。目前綁定的與angularJS和SASS。這個(gè)框架的目的是從web的角度開(kāi)發(fā)手機(jī)應(yīng)用,基于PhoneGap的編譯平臺(tái),可以實(shí)現(xiàn)編譯成各個(gè)平臺(tái)的應(yīng)用程序。

成都創(chuàng)新互聯(lián)公司專(zhuān)注為客戶(hù)提供全方位的互聯(lián)網(wǎng)綜合服務(wù),包含不限于網(wǎng)站設(shè)計(jì)制作、做網(wǎng)站、仲巴網(wǎng)絡(luò)推廣、小程序開(kāi)發(fā)、仲巴網(wǎng)絡(luò)營(yíng)銷(xiāo)、仲巴企業(yè)策劃、仲巴品牌公關(guān)、搜索引擎seo、人物專(zhuān)訪(fǎng)、企業(yè)宣傳片、企業(yè)代運(yùn)營(yíng)等,從售前售中售后,我們都將竭誠(chéng)為您服務(wù),您的肯定,是我們大的嘉獎(jiǎng);成都創(chuàng)新互聯(lián)公司為所有大學(xué)生創(chuàng)業(yè)者提供仲巴建站搭建服務(wù),24小時(shí)服務(wù)熱線(xiàn):028-86922220,官方網(wǎng)址:www.chinadenli.net

ionic安裝

首先需要安裝cordova和android環(huán)境。這個(gè)參考:phoneGap之Android環(huán)境搭建,上面寫(xiě)的很詳細(xì),還有常見(jiàn)的錯(cuò)誤及解決辦法。
然后安裝ionic:

npm install -g ionic

如果因?yàn)榫W(wǎng)絡(luò)原因安裝不上有兩種辦法:

1.修改npm源為淘寶npm源,可以使用下面三種方法中的任意一種

A.通過(guò)config命令

npm config set registry https://registry.npm.taobao.org

npm info underscore (如果上面配置正確這個(gè)命令會(huì)有字符串response)

B.命令行指定

npm --registry https://registry.npm.taobao.org info underscore

C.編輯 ~/.npmrc 加入下面內(nèi)容

registry = https://registry.npm.taobao.org

2.拷貝安裝過(guò)的ionic目錄,配置環(huán)境變量或者建立軟連接。

安裝完成之后,就可以使用ionic創(chuàng)建項(xiàng)目了。

ionic start myApp tabs  //創(chuàng)建帶有top欄和bottom欄的示例項(xiàng)目

ionic start myApp sidemenu  //創(chuàng)建帶有左側(cè)帶有menu欄的示例項(xiàng)目

ionic start myApp blank  //創(chuàng)建空白項(xiàng)目

具體效果,可以查看官網(wǎng): http://ionicframework.com/getting-started/
然后可以使用:

ionic serve

該命令會(huì)自動(dòng)啟動(dòng)流瀏覽器,查看當(dāng)前效果。

添加Android平臺(tái)

執(zhí)行下面的命令,

cd myApp
ionic platform add android //這行可能會(huì)報(bào)錯(cuò)
ionic build android
ionic emulate android

其實(shí)上面的使用方法和cordova差不多,添加android的時(shí)候可能會(huì)報(bào)錯(cuò),如下:

The error is: ======================================= events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:1000:11) at Process.ChildProcess._handle.onexit (child_process.js:791:34)

解決的方法很簡(jiǎn)單,將ionic換成cordova即可,經(jīng)測(cè)試works fine。

cd myApp
cordova platform add android //這行可能會(huì)報(bào)錯(cuò)
cordova build android
cordova emulate android

其他常見(jiàn)錯(cuò)誤

  1. 生成項(xiàng)目(ionic start myApp tabs)時(shí)可能會(huì)報(bào)錯(cuò),如下:

Error: command failed:fatal:could not create work tree dir:'C:\Users/ADMINI~1\AppData\Local\Temp\plugman\git\1402853493773'.:No such file or directory

解決辦法:進(jìn)入上面對(duì)應(yīng)的目錄,建立對(duì)應(yīng)的文件。比如在temp目錄下建立plugman目錄,在plugman目錄下建立git目錄,然后再git下建立1402853493773目錄。即可,經(jīng)測(cè)試有效。

2.sh: 1: node-gyp: Permission denied 安裝軟件包報(bào)錯(cuò)
這個(gè)一般是centos等系統(tǒng),在root用戶(hù)下安裝會(huì)報(bào)錯(cuò)。主要是權(quán)限問(wèn)題,報(bào)錯(cuò)詳情:

> node-gyp rebuild

sh: 1: node-gyp: Permission denied
\
> ws@0.4.32 install /root/.nvm/versions/node/v0.12.4/lib/node_modules/log.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

> ws@0.4.32 install /root/.nvm/versions/node/v0.12.4/lib/node_modules/log.io/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

npm ERR! Linux 3.13.0-48-generic
npm ERR! argv "/root/.nvm/versions/node/v0.12.4/bin/node" "/root/.nvm/versions/node/v0.12.4/bin/npm" "install" "-g" " log.io"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn

npm ERR! contextify@0.1.14 install: `node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the contextify@0.1.14 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log

可以清楚看到訊息中提示我們?cè)趫?zhí)行node-gyp 的時(shí)候權(quán)限不足。

查詢(xún)一下Google ,找到別人blog寫(xiě)得簡(jiǎn)單解決方法:

npm config set unsafe-perm true

接下來(lái)安裝就正常了。 至于npm config的使用方法, 請(qǐng)參考 此處 .
我們可以從npm config set unsafe-perm的解說(shuō)中看到,我們剛剛修改的意思。

Default: false if running as root, true otherwise
Type: Boolean
Set to true to suppress the UID/GID switching when running package scripts. If set explicitly to false, then installing as a non-root user will fail.

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線(xiàn),公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性?xún)r(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿(mǎn)足用戶(hù)豐富、多元化的應(yīng)用場(chǎng)景需求。

網(wǎng)頁(yè)名稱(chēng):ionic框架配置-創(chuàng)新互聯(lián)
標(biāo)題網(wǎng)址:http://www.chinadenli.net/article48/deioep.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營(yíng)銷(xiāo)企業(yè)網(wǎng)站制作Google品牌網(wǎng)站建設(shè)網(wǎng)站導(dǎo)航ChatGPT

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

小程序開(kāi)發(fā)