简体   繁体   English

即使创建新项目,Android R.Java也不会生成

[英]Android R.Java not Generating even when new project is created

I know This Question has been asked multiple time here, i already have been through many of them. 我知道在这里已经多次问过这个问题,我已经经历了很多问题。 I tired every solutions which were provided by the experts. 我厌倦了专家们提供的所有解决方案。 my problem still persist. 我的问题仍然存在。

I my case R.java file is not generated even when a new project is created. 我的案例R.java文件即使创建新项目也不会生成。 even after cleaning and rebuilding also. 甚至在清洁和重建之后。

Please help me out. 请帮帮我。

Thanks 谢谢

  1. Make sure there are no error in your .xml files where they refer to another which is non-existent 确保您的.xml文件引用了另一个不存在的文件时没有错误

  2. Make sure you don't have any upper case letters in your file names. 确保文件名中没有大写字母。

I am also facing the same kinds of problems but after so much of searching i have found that when cleaning the project in the cleaning window select the option "Build Only Selected Project" At the bottom of the Clean window. 我也遇到同样的问题,但是经过大量搜索后,我发现在清洁窗口中清洁项目时,请在“清洁”窗口底部选择“仅构建选定的项目”选项。

有关我选择恢复R.java文件的选项,请参见底部

The Same problem happened to me also,May be you updated the eclipse. 同样的问题也发生在我身上,可能是您更新了日食。

1.Check that Android SDK Build-tools is installed. 1.检查是否已安装Android SDK Build-tools。 Window->Android SDK Manager->Tools->Android SDK Build-tools 2.Make sure when you update the Android SDK Tools, you also update the Android SDK Platform-tools and Android ASK Build-tools. 窗口-> Android SDK管理器->工具-> Android SDK生成工具2.确保在更新Android SDK工具时,还同时更新了Android SDK平台工具和Android ASK生成工具。 Build fails silently if they don't match. 如果不匹配,构建会静默失败。

Solution

1.Update Android SDK Tools and Android SDK Platform-tools and Android SDK Build-tools from Android SDK Manager ( Window->Android SDK Manager->Tools->Android SDK Build-tools ).Then restart the eclipse. 1.从Android SDK Manager( Window-> Android SDK Manager-> Tools-> Android SDK Build-tools )更新Android SDK Tools和Android SDK Platform-tools和Android SDK Build-tools,然后重新启动Eclipse。

follow the following steps:: 请按照以下步骤操作:

  1. connect internet to your system(3G internet connection will be preffered) 将Internet连接到您的系统(将提供3G Internet连接)
  2. start eclipse. 开始蚀。
  3. Open SDK Manager 打开SDK管理器
  4. see at top of sdk manager window 参见sdk管理器窗口顶部
  5. Check Android Sdk Build tools 检查Android SDK构建工具
  6. click on a button a right bottom corner "install 1 package". 单击右下角的“安装1个软件包”按钮。
  7. wait untill package installs 等到软件包安装
  8. after installing ,restart eclipse 安装后,重新启动eclipse

Now your issue will resolve certainly 现在您的问题一定会解决

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM