Android Studio 新建项目 只有.idea文件夹
转载自
Android Studio原本的布局为ConstraintLayout,自己上网复制代码修改为RelativeLayout。(可能操作失误)
但从这之后开始,每次新建项目都只出现.idea文件夹。没有app等关键文件夹,无法对项目进行操作。
解决办法如下:
找到自己Android studio的安装目录
我的是默认安装路径:
C:\Program Files\Android\Android Studio\plugins\android\lib\templates\activities\common\root\res\layout
用记事本打开simple.xml文件 全选替换为以下代码 保存 重启Android Studio解决问题。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
</RelativeLayout>