cordova

ionic cordova 安卓环境配置

点点圈 提交于 2020-03-06 17:37:00
ionic 及cordova环境配置 1、安装nodejs 参见 https://blog.csdn.net/liwan09/article/details/104651650 2、安装cordova和ionic cmd 执行命令 npm i -g cordova ionic 执行完成后,可通过 node -v 和cordova -v 查看安装的版本 Android 环境配置(打包环境) 1、Java JDK配置 1)下载jdk https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htm 注:Cordova 与最新版的 JAVA SDK 不兼容,必须安装JDK 8 2)安装JDK 默认安装目录: C:\Program Files\Java\jdk1.8.0_231\ 3)JDK环境变量配置 a. 我的电脑——属性——高级系统设置——高级——环境变量 b.系统变量——新建 变量名为JAVA _HOME, 变量值为JAVA JDK 安装目录 c.系统变量——新建 变量名CLASSPATH,变量值 .;%JAVA_HOME%\lib d.选择“系统变量”中变量名为“Path”的环境变量,双击该变量,在原来变量后追加 %JAVA_HOME%\bin 测试JDK环境变量的配置成功与否

通过cordova将vue项目打包为webapp

非 Y 不嫁゛ 提交于 2020-03-05 10:00:34
准备工作:需要之前配置好vue-cli脚架构,安装好cordova环境。下面开始对vue.js项目进行打包,打包环境为Android。 可以看下我的github:https://github.com/padipata ,里面有我自己写的vue项目,喜欢的给个关注呗。 1.添加cordova项目 $ cordova create myApp1 org.apache.cordova.myApp myApp2 其中: myApp1:cordova目录名 org.apache.cordova.myApp: 包名 myApp2: 项目名(在config.xml的<name>中查看) 2.在vue中添加cordova的配置 myApp1/www/index.html----->vue/index.html 将myApp1/www/index.html中所有的<meta>拷贝到vue/index.html中 将将myApp1/www/index.html中<script>关于cordova.js的引用拷贝到vue/index.html中 myApp1/www/js/index.js----->vue/vuex/main.js var app = { // Application Constructor initialize: function() { this.bindEvents(); },

Phonegap, Lawnchair and Cookie in Android

不羁的心 提交于 2020-03-05 06:42:39
问题 I'm using Lawnchair with in my Android Phonegap App. For most of my users, Lawnchair works well. But for some reasons, some of my users say that the settings are not saved (i use Lawnchair with DOM Adapter to save settings). Are there any other adapters that i can use with phonegap for Android? I saw Cookie Adapter but it is for the previous version of Lawnchair Thanks 回答1: There are many adapters in lawnchair to store stuff. http://westcoastlogic.com/lawnchair/adapters/ The way lawnchair

Ionic Cordova SQLite plugin Windows “Cannot open include file: 'winapifamily.h': No such file or directory ”

狂风中的少年 提交于 2020-03-05 04:21:25
问题 I recently updated my Visual Studio to Visual Studio 2019 (from 2017), and this may be the cause of the problem I am about to describe. Now, when I attempt to build by Ionic project for Windows, I get the error.. c:\program files (x86)\windows kits\10\include\10.0.15063.0\ucrt\corecrt.h(196): fatal error C1083: Cannot open include file: 'winapifamily.h': No such file or directory [D:\dev\myapp\plugins\cordova-sqlite-storage\src\windows\SQLite3-WinRT-sync\SQLite3\SQLite3.UWP.vcxproj] c:

ionic cordova

我的梦境 提交于 2020-03-05 03:28:09
ionic cordova 打包 文章 http://blog.csdn.net/i348018533/article/details/47258449 http://www.cnblogs.com/cybolg/p/5222605.html http://blog.csdn.net/yuchen_0515/article/details/50722333 http://rensanning.iteye.com/blog/2205322 http://www.runoob.com/ionic/ionic-install.html android 配置环境变量 http://blog.csdn.net/hpli148/article/details/7580055 http://www.cnblogs.com/hannover/archive/2012/08/13/2637193.html JDK安装与环境变量配置 http://jingyan.baidu.com/article/363872ecd62f5f6e4ba16fcb.html ionic cordova 打包 需要的环境支持: JDK(eclipse) 可用 命令行输入判断是否安装并配置成功: javac, SDK(android studio) 可用 命令行输入判断是否安装并配置成功: android 来源:

How to use cordova-filechooser to open file on Android

倖福魔咒の 提交于 2020-03-05 03:26:14
问题 I'm develoing an Android app with Angular and Cordova, and I need to open a file with an user interaction, so I installed this Cordova plugin https://github.com/don/cordova-filechooser cordova plugin add https://github.com/don/cordova-filechooser.git --save yarn install In order to use plugin i write this code declare var fileChooser: any; ... fileChooser.open(function(uri) { alert('File is: ' + uri); }); but the console says 'fileChooser is not defined'. What is the correct way to use this

How to use cordova-filechooser to open file on Android

心不动则不痛 提交于 2020-03-05 03:26:05
问题 I'm develoing an Android app with Angular and Cordova, and I need to open a file with an user interaction, so I installed this Cordova plugin https://github.com/don/cordova-filechooser cordova plugin add https://github.com/don/cordova-filechooser.git --save yarn install In order to use plugin i write this code declare var fileChooser: any; ... fileChooser.open(function(uri) { alert('File is: ' + uri); }); but the console says 'fileChooser is not defined'. What is the correct way to use this

cordova,可以尝试下!

早过忘川 提交于 2020-03-03 15:28:35
1、安装Cordova Cordova的命令行运行在Node.js 上面并且可以通过NPM安装。 根据 平台具体指导 安装相应平台的依赖。打开命令提示符或终端,然后键入: npm install -g cordova 2、创建一个项目 使用命令行创建一个空的Cordova项目。导航到你希望创建项目的目录,然后键入 cordova create <path> 。 要知道这个命令完整的选项,键入: cordova help create 3、添加一个平台 在创建完一个Cordova项目后,导航到项目目录。在项目目录中,你需要添加你想构建app的平台 为了添加平台, 键入 : cordova platform add <platform name> 为了知道你可以添加的平台,可以运行 cordova platform 。 4、运行吧 在命令中,键入: cordova run <platform name> 来源: https://www.cnblogs.com/aspnet008/p/12402389.html

Uncaught ReferenceError: FileTransfer is not defined (using cordova 2.7.0)

情到浓时终转凉″ 提交于 2020-03-01 10:05:50
问题 I want to use FileTransfer to download a file from web server, code is as following: function downloadFile(url) { var fileTransfer = new FileTransfer(); var uri = encodeURI(url); var filepath="www/download/"; fileTransfer.onprogress = function(progressEvent) { if (progressEvent.lengthComputable) { loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total); } else { loadingStatus.increment(); } }; fileTransfer.download( uri, filePath, function(entry) { console.log("download

Cordova/Phonegap应用实现检测升级(Android版)

旧城冷巷雨未停 提交于 2020-03-01 08:21:42
App升级的原理很简单,获取服务端最新版的版本信息,与自身的版本信息进行比较,如果自身版本低,就可以提示用户下载新版本。 对于Android应用,版本信息主要存储在AndroidManifest.xml文件中: <manifest android:hardwareAccelerated="true" android:versionCode="101" android:versionName="1.0.1" android:windowSoftInputMode="adjustPan" package="net.jiusem.tjlib" xmlns:android="http://schemas.android.com/apk/res/android"> android:versionCode表示版本号,是一个整数,android:versionName表示版本名称,使用点号隔开的字符串。 检测App是否需要更新的关键在于获取到versionCode, 并与服务端的versionCode进行比较,如果小于服务端,就说明App有新版本了,需要更新。 有一款插件可以获取到App的versionCode,安装方法如下: cordova plugin add https://github.com/whiteoctober/cordova-plugin-app-version.git