gpt4 book ai didi

java - Android平台的R.id是如何生成的?

转载 作者:行者123 更新时间:2023-11-29 08:10:38 25 4
gpt4 key购买 nike

我可以假设 R.id 文件将出现在每个 android 项目中吗?

或者这是否特定于某些开发环境?

最佳答案

它由编译器自动生成;您可以放心地假设它会一直存在。

检查 the documentation :

A project's R.java file is an index into all the resources defined in the file.

You use this class in your source code as a sort of short-hand way to refer to resources you've included in your project.

This is particularly powerful with the code-completion features of IDEs like Eclipse because it lets you quickly and interactively locate the specific reference you're looking for.

关于java - Android平台的R.id是如何生成的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8298415/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com