一个快速创建基础 Android 项目的模版。
English | 简体中文
![]() |
BetterAndroid |
---|
这个项目属于上述组织,点击上方链接关注这个组织,发现更多好项目。
这是一个快速创建基础 Android 项目的模版,通过此模版,你可以快速创建一个干净、简洁的标准 Android 项目。
模版中自动为你集成了 BetterAndroid 依赖,它能助你的开发变得更轻松。
如果你需要使用 Jetpack Compose 的开发方式,请参考另一个模板 android-compose-app-template。
在 GitHub 上点击 “Use this template” 按钮来使用此模版,成功创建新的存储库后,使用 git clone
命令将你的项目克隆到本地,此时不要立即打开项目。
在项目的根目录,你可以找到 initializer.json
和 initializer.py
两个文件,请打开 initializer.json
文件,内容如下。
{
// 你的项目名称,这将作为整个 Gradle 项目的名称,只允许英文
"__PROJECT_NAME__": "android-app-demo",
// 你的 App 名称
"__APP_NAME__": "Android App Demo",
// 你的 App 包名
"__PACKAGE_NAME__": "com.highcapable.androidappdemo"
}
编辑完成配置文件后,运行 initializer.py
脚本对项目进行初始化,初始化成功后这两个文件会被自动删除。
如果你的系统中没有 Python,请前往 官网 下载一个,然后在命令行执行 python3 initializer.py
。
如果你正在使用 macOS 或 Linux,你可以直接执行 ./initializer.py
。
项目初始化成功后,你可以使用 Android Studio 或 IntelliJ IDEA 打开这个项目。
Apache License Version 2.0
Copyright (C) 2019 HighCapable
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
版权所有 © 2019 HighCapable