Why in Android studio i can not find most of Attributes to add for views in XML layout like padding,textSize and etc

江枫思渺然 提交于 2020-05-17 06:46:25

问题


Before when in XML layout I was typing {t} android studio brings some suggestion and by chose which one I want it completed automatically and still in the old project Suggestion and Auto Complete is working like below image

But in new project when i want to add Vertical orientation at most it suggest orientation and i should write vertical completely by myself and for example to define "textSize" i should write completely by my self and android doesn't suggest

also for adding new View i should write most of things like below attributes completely by myself and i got headache !

 android:layout_width="wrap_content"
 android:layout_height="wrap_content"

my Android studio version is 3.6.1


回答1:


if you get this error during your development time then please run following command to clear gradle cache:

rm -rf ~/.gradle/caches/

after that please click on Invalidate Caches/Restart from File menu then further processing will happen which dowloads all the libraries again so it takes time but also resolves this issue.




回答2:


After some Days for looking answer and try so many suggestions (some comments for this question and answer (clear cache, delete cache,delete .gradle folder, do invalidate caches , or delete all .imp or .idea folder and restart android studio , try some new projects) ) unfortunately it couldn't solve my problem so I decide to re Install Android studio , so its obvious now it works( its the last way )



来源:https://stackoverflow.com/questions/61222586/why-in-android-studio-i-can-not-find-most-of-attributes-to-add-for-views-in-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!