New Android Application Project - layout file and activity class are not created by ADT

雨燕双飞 提交于 2019-12-04 05:40:21

问题


Environment: Eclipse ADT Build: v22.3.0-887826, Windows 8.1 Host.

I make the following steps to create new Android project:

File - New Android Application Project. Application Name: Sample, all other fields default: Minimum SDK 8, Target 18, compile with 19. Next.

Create custom launcher - off, Create activity - on. Next.

Blank activity, Next.

SampleActivity, Layout name activity_sample. Finish.

Finally, I open package explorer, Sample - res. Layout directory is empty. src directory is also empty, main activity class is not created.


回答1:


Try updating ADT to 22.6 using this link Android Developer Tools Update Site - http://dl-ssl.google.com/android/eclipse/




回答2:


Go to following:
'Help'->'Install New Software' and type https://dl-ssl.google.com/android/eclipse/

Select ADT option and install it. It will update the ADT.

Even I had the same problem and my issue got resolved with it!!




回答3:


I had a similar problem on Mac OsX 10.9.2 and updated to

Android Developer Tools 22.3.0.v201310242005-887826

which is the same version that Alex had the original problem on. For me, the updating fixed the problem, so I don't think it was the version of ADT that was causing the problem. Something else in the update process cleared the cause of the problem. Now, when I create a new Android project, the layout files and activity class is created, as expected.



来源:https://stackoverflow.com/questions/22421395/new-android-application-project-layout-file-and-activity-class-are-not-created

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