mirror of
https://gitee.com/openharmony/applications_settings
synced 2024-11-23 06:20:01 +00:00
1.README,以及对应的图片
Signed-off-by: 15952050689 <lifz0125@thundersoft.com>
This commit is contained in:
parent
3b4d02c4f9
commit
a3327547ae
109
README.md
109
README.md
@ -76,115 +76,6 @@ Model:模型层,负责处理数据,包括wifi的model,应用管理model
|
||||
```
|
||||
git clone 步骤2中复制的地址
|
||||
```
|
||||
### 环境搭建
|
||||
#### 1. 下载安装 DevEco Studio
|
||||
Settings使用 DevEco Studio 进行开发,开发前需要下载 DevEco Studio 。
|
||||
|
||||
**1)下载**
|
||||
|
||||
在下载页面下载 DevEco Studio 的安装包压缩文件([下载地址](https://developer.harmonyos.com/cn/develop/deveco-studio#download))。
|
||||
下载页面如下:
|
||||
|
||||
![](./figures/ds_download.png)
|
||||
|
||||
> 注:下载 DevEco Studio 需要注册华为账号。
|
||||
> ![](figures/hw_register.png)
|
||||
|
||||
**2)安装**
|
||||
|
||||
将下载下来的压缩包解压,得到安装文件如图:
|
||||
|
||||
![](./figures/ds_exe.png)
|
||||
|
||||
双击安装文件进行安装,安装过程如图所示:
|
||||
|
||||
![](./figures/ds_install_1.png)
|
||||
|
||||
![](./figures/ds_install_2.png)
|
||||
|
||||
#### 2. 安装开发 SDK
|
||||
DevEco Studio 在安装完成之后会自动下载开发 SDK 下载过程如下图所示:
|
||||
|
||||
![](./figures/sdk_downloading.png)
|
||||
|
||||
### 工程导入 DevEco Studio
|
||||
|
||||
> 由于 Settings 的开源代码中删除了工程中的 `build.gradle` 文件,所以我们需要在相应的目录创建 `build.gradle` 文件以保证工程可以被正确导入 DevEco Studio 。
|
||||
|
||||
#### 1. 为 Settings工程添加 `build.gradle`
|
||||
|
||||
1. 在工程根目录下,添加 build.gradle 文件,内容如下:
|
||||
|
||||
```
|
||||
apply plugin: 'com.huawei.ohos.app'
|
||||
|
||||
ohos {
|
||||
compileSdkVersion 7
|
||||
defaultConfig {
|
||||
compatibleSdkVersion 6
|
||||
}
|
||||
supportSystem "standard"
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://repo.ark.tools.huawei.com/artifactory/maven-public/'
|
||||
}
|
||||
maven {
|
||||
url 'https://mirrors.huaweicloud.com/repository/maven/'
|
||||
}
|
||||
maven {
|
||||
url 'https://developer.huawei.com/repo/'
|
||||
}
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.huawei.ohos:hap:3.0.3.2'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://repo.ark.tools.huawei.com/artifactory/maven-public/'
|
||||
}
|
||||
maven {
|
||||
url 'https://mirrors.huaweicloud.com/repository/maven/'
|
||||
}
|
||||
maven {
|
||||
url 'https://developer.huawei.com/repo/'
|
||||
}
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. 在工程的 entry 目录下,添加 build.gradle 文件,内容如下:
|
||||
|
||||
```
|
||||
apply plugin: 'com.huawei.ohos.hap'
|
||||
ohos {
|
||||
compileSdkVersion 7
|
||||
defaultConfig {
|
||||
compatibleSdkVersion 6
|
||||
}
|
||||
arkEnabled false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
```
|
||||
|
||||
#### 2. build Settings 工程
|
||||
|
||||
在添加完上面三个 build.gradle 文件后,DevEco Studio 可以正常导入工程。
|
||||
|
||||
选择Build → Build Haps(s)/APP(s) → Build Hap(s)
|
||||
|
||||
![](./figures/ds_build_haps.png)
|
||||
|
||||
## 4. 基础开发说明
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user