Ionic Frameworkionic开发Ios@IONIC

Simar Ionic

2018-01-26  本文已影响0人  Simar

目录

  1. 开发中的错误及解决办法(ionic 1&ionic3)
  2. 工具网站
  3. 创建Cordova 插件

Error List

  1. error MSB3411: Could not load the Visual C++ component "VCBuild.exe.

Solution 1:

  1. Install VS 2013
  2. node-gyp configure --msvs_version=2013\

Solution 2:

  1. from git
  1. 安装File 插件报错:
    Plugin doesn't support this project's cordova-android version. cordova-android: 6.2.3, failed version requirement: >=6.3.0

Solution:

  1. 卸载项目的android平台 ionic cordova remove android
  2. 更新全局cordova版本 npm install cordova -g
  3. 更新Android SDK
  4. 安装项目的android平台ionic codova add android
  1. 安装自定义插件报错:
    Invalid package.json

Solution

  1. 获取package.json plugman createpackagejson "path of your plugin"
  2. 再次安装插件
    According:stackoverflow
  1. ionic cordova build adnroid
    spawn EACCES

Solution 1:

  1. ionic cordova platform remove android
  2. ionic cordova platform add android

Solution 2:
sudo chmod 755 YOUR_GRADLE_PATCH

  1. npm install 命令之后,安装出现异常

Solution:
使用npm i提到npm install

  1. npm install 显示错误 Error: EACCES, mkdir '/usr/local/lib/node_modules/node-sass' - installing globally

Solution:
mac 上推荐使用sudo npm install --unsafe-perm 去安装ionic 内的node_modules
Github上的参考

7.Failed to execute aapt with cordova
Ionic cordova build Error(Cordova 8.0.0 )

Failed to execute aapt with cordova

configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}

  1. Google Play Services Version conflict

9.Ionic Resources not uploading

Hey guys. My solution is tinypng.
https://tinypng.com/

  1. ionic cordova build android ,show errror:No installed build tools found. Install the Android build tools version 19.1.0 or higher.

配置Android SDK环境变量 .
for more

  1. 添加iconfont
  2. git clone error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054

RTL
Link

Progress Bar

There is not official process bar.
Build a Simple Progress Bar Component in Ionic 2 & 3
And here is a progress bar PR on GitHub.

工具包

  1. 生成组件树插件
  2. Angular 1Http Post Fail
  3. Location with Baidu
    3.1 Question:Can't get the location when it is offline
  4. Signature
  5. The src of image in ionic :

Must be like
<img src="assets/imgs/logo.2.png"/>
<ion-img width="100" height= "100"src="assets/imgs/logo.2.png"></ion-img>

6.The showing pdf cordova plugin

  1. sitewaerts / cordova-plugin-document-viewer It's limited by Google Play
  2. PSPDFKit/Cordova-Android PSPDFKit is a commercial PDF framework.
  3. gearit/RadaeePDF-Cordova RadaeePDF-Cordova is a commercial PDF framework.
  4. CordovaAndroidShowPDFPluginCreate by me.It only can be used to show PDF
  5. ionic Login issue
  1. Ionic 版本升级手册

Create a Cordova Plugin

  1. 使用命令进行安装:npm install -g plugman

    如果已安装,则忽略这步。

  2. 创建自定义插件

    plugman create --name AndroidShowPDFPlugin --plugin_id simar.android.AndroidShowPDFPlugin --plugin_version 0.0.1

    AndroidShowPDFPlugin 为插件名称

    plugin_id:simar.android.AndroidShowPDFPlugin 为插件ID

    plugin_version: 0.0.1为插件版本

  3. 添加平台支持

    cd AndroidShowPDFPlugin

    添加android平台支持 plugman platform add --platform_name android

  4. 写自己逻辑

  5. 在项目中添加自己的插件

  6. plugman createpackagejson [插件路径]

  7. cordova plugin add [插件路径] --force

  8. cordova build android

  9. 将ionic项目下Platform 文件夹下android 这个文件夹导入到Android Studio。这样能可以知道自己的插件哪里写错了

学习资源

1.From others

GapDebug(Use Chrome instead)

https://medium.com/@tintin301/ionic-sqlite-storage-setting-up-for-browser-development-and-testing-67c0f17fc7af
https://www.techiediaries.com/mocking-native-sqlite-plugin/

FIX – Problem loading URL: xxx/emulated_devices_module.js

我的Github:
https://github.com/SimarSima

上一篇 下一篇

猜你喜欢

热点阅读