IntelliJ IDEA 10.5 添加图像时 R.java 出错!
我在 IntelliJ IDEA 10.5(IC 版)中创建一个新的 Android 项目,注册 Android 库,一切顺利。然后我将 /drawable 目录添加到 /res 目录并在其中放置图像。如果我想编译,就会出现错误。
当我导航到 R.java 中的这些行时,我只看到一个简单的自动生成的初始化。
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int img1=0x7f020002;
public static final int img2=0x7f020003;
public static final int icon=0x7f020004;
public static final int img3=0x7f020005;
}
public static final class layout {
public static final int main=0x7f030000;
public static final int other=0x7f030001;
}
public static final class string {
public static final int app_name=0x7f040000;
}
}
有谁知道这个问题是什么?我正处于项目的开始阶段,我想我会回到10.0.3版本。
I create a new Android project in IntelliJ IDEA 10.5 (IC edition), register Android library and all goes fine. Then I add /drawable directory to /res directory and place an image inside of it. If I want to compile, I get an error.
When I navigate to these lines in R.java, I see just a simple auto-generated initializations.
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int img1=0x7f020002;
public static final int img2=0x7f020003;
public static final int icon=0x7f020004;
public static final int img3=0x7f020005;
}
public static final class layout {
public static final int main=0x7f030000;
public static final int other=0x7f030001;
}
public static final class string {
public static final int app_name=0x7f040000;
}
}
Anyone knows that this problem is? I am in the beginning of the project and I think I will return to 10.0.3 version.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是android的限制,而是java变量名称的限制。它不能以数字开头。
It is not the android limitation but java variable name one. It can not start with a number.