Eclipse不会创建主要活动和布局 [英] Eclipse doesn't create Main Activity and layout

查看:225
本文介绍了Eclipse不会创建主要活动和布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能再开始新的项目了。这是我做的...

I can't start new projects anymore. This is what I do...


  • 启动Eclipse。

  • 新的Android应用程序

    • min API 8

    • 目标 API 18

    • 编译 API 19

    • 创建活动:选中

    • 活动名称: MainActivity

    • 布局名称: activity_main

    • 完成

    • Start Eclipse.
    • New Android Application
      • min API 8
      • target API 18
      • compile API 19
      • create activity : checked
      • activity name : MainActivity
      • layout name : activity_main
      • finish

      当我打开项目(甚至不打开 MainActivity .java 应该是)
      - src 文件夹为空
      - res / layout 文件夹为空

      When I open the project (it doesn't even open MainActivity.java as it should be) : - src folder is empty - res/layout folder is empty

      但是AndroidManifest.xml 存在。它工作得很好,之前我能够创建项目,然后它突然崩溃。

      But AndroidManifest.xml exists. It was working perfectly before and I was able to create projects then it just suddenly broke.

      我正在使用的API 18和19全部安装并且是最新的。 p>

      I'm using APIs 18 and 19 all installed and up to date.

      推荐答案

      在Android SDK Manager上更新最新的软件包后,昨天我也遇到了同样的问题。

      I had the same problem yesterday after updating the latest packages on the Android SDK Manager.

      通过更新Eclipse插件来修复它:运行Eclipse > 帮助> 安装新软件> 粘贴URL https://dl-ssl.google.com/android/eclipse/ ,然后按输入。更新插件后,我创建了一个测试项目,主要活动和菜单默认情况下正常创建。

      Fixed it by updating the Eclipse plugin: Run Eclipse > Help > Install new software > Paste the URL https://dl-ssl.google.com/android/eclipse/ then press Enter. After updating the plugin, I created a test project with the main activity and menu was created by default as normal.

      这篇关于Eclipse不会创建主要活动和布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆