当前位置: 移动技术网 > 移动技术>移动开发>Android > 关于android studio布局文件中不能自动补齐属性的解决方法

关于android studio布局文件中不能自动补齐属性的解决方法

2020年08月02日  | 移动技术网移动技术  | 我要评论
关于android studio布局文件中不能自动补齐属性的解决方法问题:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView /&

关于android studio布局文件中不能自动补齐属性的解决方法

问题:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <TextView /> </LinearLayout> 

创建一个新的TextView控件的时候发现不会自动生成各种属性了,像id,width,height这些属性都没了,几种解决方法如下:

1.Module的iml文件缺少有关SDK属性的一段代码,删了重新build一下(无效)

2.关闭省电模式,File->Power Save Mode,但是我一直没开(无效)

3.没有设置buildToolsVersion,我设置之后还是没用(无效)

4.将目前正在使用的SDK卸载之后再重新安装,然后重启studio(成功)

File->setting->Android SDK->勾去最新版SDK->Apply;
勾选最新版SDK->Apply
如图:
在这里插入图片描述

本文地址:https://blog.csdn.net/qq_36158551/article/details/107729949

如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网