ionic是一個垮平臺開發框架,可經過web技術開發出多平臺的應用。但只建議開發簡單應用。複雜的應用須要用到許多cordova插件,而cordova插件的更新或者移動平臺的更新極可能致使插件的不可用,維護升級成本較高。node
npm install -g ionic
sh-3.2# node --version v10.14.2 sh-3.2# ionic --version 5.0.0
輸出了版本好說明安裝成功了。android
ionic start myApp tabs
cd myApp
、ionic serve
Error: Cannot find module 'node-sass’
npm install node-sass --save-dev
npm i -g cordova
ionic cordova platform add ios
ionic cordova prepare ios
,之後都只須要這一步就能夠在xcode上運行。ionic cordova platform add android
404 Not Found: amdroid@latest
ionic cordova platform rm android
ionic cordova platform update android
ionic cordova platform add android
The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.
在manifest把minSdkVersion刪掉便可,目錄是:
CordovaLib->AndroidManifest.xml
app->src->main->AndroidManifest.xml
<uses-sdk android:minsdkversion="19">
3. android平臺也運行起來了
ios
做者:垚淼
出處:www.ljmin.comweb