Android Studio doesn't show new Activity option

自古美人都是妖i 提交于 2021-02-08 08:58:23

问题


My android studio doesn't responding well. It does not show new Activity option. Even it does not display other option too . I Cleaned and rebuild the project . Even I restart Android studio several times too . Please Help me to solve this issue.


回答1:


I ran into this same issue and tried numerous things that I found online but nothing worked. Then I just started trying out random things and when I ran "File -> Sync Project with Gradle files" it started working for me. I can now create Activities as expected, e.g. right-click -> New -> Activity -> etc.




回答2:


You should create New Java Class which extends Activity rather than directly create Activity.




回答3:


Have you tried updating to the higher version?




回答4:


Here you got new Java class option, from where you can create a new class, interface, enum, annotation.

You have to extends Activity in your class.




回答5:


Try installing it again. May that will solve the problem because I was facing the same problem on version 2.2 and reinstalling it solves my problem.




回答6:


You can assign a shortcut to any action you want

File > Settings > Keymap

and search for Blank Activity. Now right click the item and select Add Keyboard Shortcut.




回答7:


right click on app folder of your project and you will see Activity option



来源:https://stackoverflow.com/questions/43906940/android-studio-doesnt-show-new-activity-option

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