移动app第一天

1.改变this指针:call apply bind

2.响应式布局和屏幕自适应的区别:响应式会改变样式,自适应不会

3.什么是mvc?

  组织代码结构的方式.本质是降低代码的耦合度

4.什么是什么?代码构建工具

参考网站:http://www.ydcss.com/archives/18

5.app开发有几种:混合开发,原生开发,webapp

6.ionic&reactN环境搭建:

  1.AndroidDevTools Android SDK下载:http://www.androiddevtools.cn/

  2.开源镜像站:http://mirrors.neusoft.edu.cn/

  3.配置android环境变量

  4.全局下载打包工具cordova和框架ionic

     5.创建ionic start 项目名

  6.添加项目平台:ionic platform adb android 

  7.直接运行在手机:ionic run android

 报错:no platforms added to this project.....

  解决方案:进入项目文件夹,在命令行输入

  1. cordova/ionic platform add android/ios,然后再执行上面第7条.

报错:

Cordova打包安卓遭遇gradle守护进程无法启动?

D:\work\learn\otc>cordova build android
ANDROID_HOME=D:\work\android-sdk-windows
JAVA_HOME=D:\work\jdk1.8.0_91
Subproject Path: CordovaLib
Downloading

Unzipping C:\Users\admin\.gradle\wrapper\dists\gradle-2.14.1-all\4cj8p00t3e5ni9e8iofg8ghvk7\gradle-2.14.1-all.zip to C:\Users\admin\.gradle\wrapper\dists\gradle-2.14.1-all\4cj8p00t3e5ni9e8iofg8ghvk7
Starting a new Gradle Daemon for this build (subsequent builds will be faster).

FAILURE: Build failed with an exception.


* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at Gradle User Guide Version 2.14.1
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap




* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at Gradle User Guide Version 2.14.1
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
解决方案:cordova版本和sdk不匹配
    npm install -g cordova@4.2
posted @ 2017-04-19 00:09  九门提督琪琪  阅读(285)  评论(0编辑  收藏  举报