Eclipse不产生MainActivity.java和放大器; activity_main.xml [英] Eclipse doesn't generate MainActivity.java & activity_main.xml

查看:978
本文介绍了Eclipse不产生MainActivity.java和放大器; activity_main.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建一个新的Andr​​oid应用程序项目, MainActivity.java 根据其包名应自动在的src 文件夹和放大器产生的; activity_main.xml 应在布局文件夹中创建。但它不是创建。

On creating a new Android Application Project, MainActivity.java under its package name should be generated automatically in src folder & activity_main.xml should be created inside layout folder. But it is not created.

和还体现它不`吨产生这个POC

And also in manifest it doesn`t generate this POC

 <activity
        android:name="info.androidhive.slidingmenu.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

不过,我手动添加这些东西。

However, I added all these things manually.

  • activity_main.xml则显示此错误

  • activity_main.xml then shows this error

 Eclipse is loading framework information and the layout library from the SDK folder.
 activity_main.xml will refresh automatically once the process is finished.

  • MainActivity.java无法识别的setContentView(R.layout.activity_main)布局领域

    和昨天我downloalded从 SDK管理器更新这些工具安装/更新

    And yesterday I downloalded the updates from SDK Manager these tools are installed /updated

    我试图清理项目,改变了工作区,重新启动日食和放大器;窗户,但它并没有帮助:(

    I tried cleaning the project,changing the workspace,restarting the eclipse & windows but it doesn't helps :(

    推荐答案

    正如有人所说

    我有同样的问题,即使我下载了Android SDK和做一个干净的安装,但我只是解决了它。我试着点击帮助 - >检查更新,然后我得到了一个弹出消息说,一切是最新的,但经过进一步研究它似乎对我来说是不是最新的。你需要做的是点击帮助 - >安装新软件,并安装(这将更新)从这个网址: https://dl-ssl.google.com/android/eclipse/

    I had the same problem even though I downloaded the Android SDK and did a clean install, but I just resolved it. I tried to click "Help" -> "Check for updates", and then I got a pop-up message saying everything was up to date, but after further research it appeared to me it wasn't up to date. What you need to do is click "Help" -> "Install new software" and install (this will update it) from this url: https://dl-ssl.google.com/android/eclipse/

    在这里看到线程<一href="https://$c$c.google.com/p/android/issues/detail?id=66647">https://$c$c.google.com/p/android/issues/detail?id=66647

    这篇关于Eclipse不产生MainActivity.java和放大器; activity_main.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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