Vue Cli4 + Cordova
不要隨意更改內容,고만습니다。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
只是筆記區,可能有錯誤
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
請確認已完成環境建置
請參考
JDK、Android Studio、Gradle下載、安裝和環境變數配置
- 驗證環境
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
參考網站 https://juejin.im/post/5e12b081f265da5d174dcb90
1. 建立Cordova項目
2. 添加Android平台
預設安裝最新Android版本
3. Cordova打包APK測試
- 使用Android Studio打開AVD,將apk檔案拉進畫面安裝測試
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
看到此畫面代表成功
4. 新建Vue cli
安裝完成後用vue -V,檢查是否安裝成功。
選項(選擇手動Maually select features)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
手動操作請參考以下(依個人需求設定)
https://ithelp.ithome.com.tw/articles/10216606
https://book.vue.tw/CH3/3-1-vue-cli-introduction.html
https://ithelp.ithome.com.tw/articles/10216606
- 瀏覽器打開出現這畫面,代表成功
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
4. 新建vue.config.js
- 在專案目錄底下新建vue.config.js
- 其他的配置可以參考 https://cli.vuejs.org/zh/config/
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
5. Cordova + Vue Cli打包APK測試
- 使用Android Studio打開AVD,將apk檔案拉進畫面安裝測試
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
看到此畫面代表成功
6. 更換APP Icon樣式 及 APP 名稱、以及APP起始頁面
請參考 圖示和啟動畫面
皆在config.xml裡面設定
設定APP Icon
可以通過<icon>元素定義應用程序圖標。如果未指定圖標,則使用Apache Cordova預設。
以下配置可用於定義單個默認圖標,該圖標將用於所有平台。
若是沒有res資料夾請在/cordova/cordova-project/底下,
建立一個res資料夾將icon放置在此處。
設定起始畫面
Android平台
Ios平台
如不想有起始畫面
如不想有Spinner旋轉進度
禁用滾動
允許 HTML5 媒體重播顯示內聯在螢幕佈局,使用瀏覽器提供的控制項,而不是本機控制項內
強制全螢幕顯示