深深圳市建设局网站,wordpress评论框函数,wordpress codeus,wordpress 建立模型使用Android架构模板
项目介绍
为了方便开发者引入最新的Android架构组建进行开发#xff0c;Google官方给我们引入了一个架构模板#xff0c;方便我们快速进入开发。
github地址#xff1a; https://github.com/android/architecture-templates 该模板遵循官方架构指南 …使用Android架构模板
项目介绍
为了方便开发者引入最新的Android架构组建进行开发Google官方给我们引入了一个架构模板方便我们快速进入开发。
github地址 https://github.com/android/architecture-templates 该模板遵循官方架构指南 https://developer.android.com/topic/architecture/recommendations
这个模板包含了下面常用的组件
Room Database https://developer.android.com/training/data-storage/room Dependency injection with Hilt https://developer.android.com/training/dependency-injection/hilt-android Jetpack ViewModel https://developer.android.com/topic/libraries/architecture/viewmodel UI using Jetpack Compose and Material3 https://developer.android.com/jetpack/compose https://developer.android.com/jetpack/androidx/releases/compose-material3 Jetpack Navigation https://developer.android.com/jetpack/compose/navigation Reactive data layer https://developer.android.com/topic/architecture/data-layer Kotlin Coroutines and Flow https://developer.android.com/kotlin/coroutines Unit tests https://developer.android.com/training/testing/local-tests UI tests using fake data with Hilt https://developer.android.com/jetpack/compose/testing KTS gradle files https://docs.gradle.org/current/userguide/kotlin_dsl.html Version catalog https://docs.gradle.org/current/userguide/platforms.html A simple UI that shows a list of saved items and lets the user save new ones.
分支
现在存储库包含两个模板分支
base— 反应式架构、Compose、数据库、单模块 multimodule— 在多个模块中实现的基本模板
要求
该项目包括一个customizer.sh重命名文件和包并清理所有内容的脚本。它适用于Linux和macOS使用 bash 4 及更高版本。在 Windows 上您可以使用适用于 Linux 的 Windows 子系统。如果您发现脚本有任何兼容性问题请提交错误。
用法
克隆存储库可以选择一个分支。例如检查base分支
git clone https://github.com/android/architecture-templates.git --branch base运行定制程序脚本
bash customizer.sh your.package.name DataItemType [YourAppName]your.package.name是您的应用 ID应为小写DataItemType用于主应用实体、公开状态和数据库实体的名称应为 PascalCase。 或者您可以为您的应用程序指定一个名称应该是 PascalCase。 这里可以理解为主业务实体例如Contacts、Game、Moive等。 注意定制程序脚本需要 bash 4 及更高版本。 在macos你应该安装bash最新版本
brew install bash