Simar Ionic
目录
- 开发中的错误及解决办法(ionic 1&ionic3)
- 工具网站
- 创建Cordova 插件
Error List
- error MSB3411: Could not load the Visual C++ component "VCBuild.exe.
Solution 1:
- Install VS 2013
- node-gyp configure --msvs_version=2013\
Solution 2:
- 安装File 插件报错:
Plugin doesn't support this project's cordova-android version. cordova-android: 6.2.3, failed version requirement: >=6.3.0
Solution:
- 卸载项目的android平台
ionic cordova remove android
- 更新全局cordova版本
npm install cordova -g
- 更新Android SDK
- 安装项目的android平台
ionic codova add android
- 安装自定义插件报错:
Invalid package.json
Solution
- 获取package.json
plugman createpackagejson "path of your plugin"
- 再次安装插件
According:stackoverflow
- ionic cordova build adnroid
spawn EACCES
Solution 1:
ionic cordova platform remove android
ionic cordova platform add android
Solution 2:
sudo chmod 755 YOUR_GRADLE_PATCH
- npm install 命令之后,安装出现异常
Solution:
使用npm i
提到npm install
- 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 )
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
9.Ionic Resources not uploading
Hey guys. My solution is tinypng.
https://tinypng.com/
- 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
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.
工具包
- 生成组件树插件
- Angular 1Http Post Fail
-
Location with Baidu
3.1 Question:Can't get the location when it is offline - Signature
- 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
- sitewaerts / cordova-plugin-document-viewer It's limited by Google Play
- PSPDFKit/Cordova-Android PSPDFKit is a commercial PDF framework.
- gearit/RadaeePDF-Cordova RadaeePDF-Cordova is a commercial PDF framework.
- CordovaAndroidShowPDFPluginCreate by me.It only can be used to show PDF
- ionic Login issue
Create a Cordova Plugin
-
使用命令进行安装:npm install -g plugman
如果已安装,则忽略这步。
-
创建自定义插件
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为插件版本
-
添加平台支持
cd AndroidShowPDFPlugin
添加android平台支持 plugman platform add --platform_name android
-
写自己逻辑
-
在项目中添加自己的插件
-
plugman createpackagejson [插件路径]
-
cordova plugin add [插件路径] --force
-
cordova build android
-
将ionic项目下Platform 文件夹下android 这个文件夹导入到Android Studio。这样能可以知道自己的插件哪里写错了
学习资源
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