android-studio - 我在 android studio 中创建 android 项目时没有自动创建布局资源目录
问题描述
起初,当我在 android studio 中创建我的 android 项目时,android studio 会自动创建一个布局资源目录,其中包含 activity_main.xml 文件以及 java 目录中的 main.kt 文件。但是在创建了一些项目后,android studio 无法自动为我提供带有 activity_main.xml 和 main.kt 文件的布局目录。我是 android studio 环境的初学者,这就是为什么我更喜欢它带有布局资源文件夹和 activity_main 文件夹的原因,因为当我搞砸了配置时我自己创建它们并且无法在我的android手机上午餐应用程序。我想知道是否有办法扭转这个问题,或者我应该总是自己创建我的布局资源目录,如果是这样,我想演示一下如何创建我的 main_activity。xml,这样我就不会弄乱配置。任何帮助将不胜感激,并在此先感谢。
解决方案
It seems you are looking to create from a template (create activity along with the layout and added the activity in the manifest as well). Please read the docs in here: https://developer.android.com/studio/projects/templates
推荐阅读
- excel - 在 MS Excel 中检索空白单元格的标题列表
- javascript - Javascript中2个类之间的数据传输
- scala - 使用scala将句子中存在的多个表情符号添加到数组中
- powershell - 在 PowerShell 中尝试/捕获使用 Invoke-SQLCmd 不起作用
- aws-lambda - 使用 SQS 触发的无服务器不将输出发送到配置的目标
- html - 媒体查询不适用于 IsotopeJS 网格项目
- python - 你如何跳过python中的一些代码行?
- javascript - 使用插值 API 数据的标记中的 If 语句
- c# - 如何修复错误 System.InvalidOperationException: Unable to resolve service for type 获取服务时?
- tensorflow - 在 Colab 中执行联邦学习文本生成教程时出错