美文网首页App开发笔记-模仿【糖水】
【App开发笔记】2.2国际惯例先来个“hello world”

【App开发笔记】2.2国际惯例先来个“hello world”

作者: 7abbcd54a89d | 来源:发表于2017-08-22 23:38 被阅读0次

    源码地址

    2.2.1 下载并安装APICloud Studio 2

    如果系统没有安装GIT,IDE会先提醒你安装,按着提示来就可以,最后重启电脑再打开APICloud Studio 2

    2.2.2 下载并安装 WebStorm

    2.2.3 本地环境搭建

    在APICloud Studio登录帐号,之后在上方菜单栏中依次选择“代码管理”“代码检出”“ApiCloud云端应用”将刚才创建的项目基础代码同步到本地。


    选择项目

    2.2.4 删掉默认文件夹下用不到的东西,并添加一些基础类库(css,js)

    最终目录结构 目录结构

    2.2.5 配置config.xml文件,具体各个配置项的含义请参考config.xml应用配置说明

    <widget id="A6058707118155" version="0.0.1">
        <name>app开发笔记</name>
        <description>app开发笔记</description>
        <author email="@qq.com" href="">一个被编程耽误的医生</author>
        <content src="index.html"/>
        <access origin="*"/>
        <preference name="pageBounce" value="false"/>
        <preference name="appBackground" value="rgba(0,0,0,0.0)"/>
        <preference name="windowBackground" value="rgba(0,0,0,0.0)"/>
        <preference name="frameBackgroundColor" value="rgba(0,0,0,0.0)"/>
        <preference name="hScrollBarEnabled" value="true"/>
        <preference name="vScrollBarEnabled" value="true"/>
        <preference name="autoLaunch" value="true"/>
        <preference name="fullScreen" value="false"/>
        <preference name="autoUpdate" value="true"/>
        <preference name="smartUpdate" value="false"/>
        <preference name="debug" value="true"/>
        <preference name="statusBarAppearance" value="true"/>
        <preference name="softInputBarEnabled" value="false"/>
        <permission name="readPhoneState"/>
        <permission name="camera"/>
        <permission name="record"/>
        <permission name="location"/>
        <permission name="fileSystem"/>
        <permission name="internet"/>
        <permission name="bootCompleted"/>
        <permission name="hardware"/>
    </widget>
    

    2.2.6 在index.html文件中写入以下代码:

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport"
              content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
        <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
        <title>app开发笔记</title>
        <link rel="stylesheet" type="text/css" href="./css/Hui.css"/>
    </head>
    <body class="H-center-all H-height-100-percent">
    <div class="H-font-size-24 H-theme-font-color1">hello world</div>
    <script type="text/javascript" src="./script/api.js"></script>
    </body>
    </html>
    

    2.2.6 对代码进行本地提交

    ① 在APICloud Studio 2中右键项目根目录选择“Git”->“Git add+commit”

    “Git”->“Git add+commit”
    ② 提交更新内容,CTRL+S保存
    更新内容

    2.2.7 将代码提交云端

    ① 在APICloud Studio 2中右键项目根目录选择“代码管理”->“同步到云端”

    “代码管理”->“同步到云端”
    ② 右边显示“成功与云端同步数据”表示提交成功
    成功与云端同步数据

    2.2.8 编译自定义loader(我个人理解“自定义loader”就是一个容器,其他具体的解释请看自定义loader说明

    ① 在APICloud Studio 2中右键项目根目录选择“云编译自定义AppLoader”

    编译自定义loader
    ② 在右边弹出的窗口中选择“编译IOS自定义loader”和“编译Android自定义loader”即可
    “编译IOS自定义loader”和“编译Android自定义loader”
    ③ 稍等一会,将安装包下载到手机中。

    2.2.9 安装自定义loader->打开->设置wifi同步地址->wifi全量同步

    2.2.10 hello world

    hello world

    相关文章

      网友评论

        本文标题:【App开发笔记】2.2国际惯例先来个“hello world”

        本文链接:https://www.haomeiwen.com/subject/qlnqdxtx.html