开发者

what can the R.java do when it runs in Eclipse and builds to apk?

开发者 https://www.devze.com 2023-02-23 02:09 出处:网络
开发者_高级运维I delete the R.java of my application, andbuild my application to apk successfully.It means that the R.java doesn\'t work.
开发者_高级运维

I delete the R.java of my application, and build my application to apk successfully.It means that the R.java doesn't work. why?


That's because it gets re-created as part of the build process, based on what's in your strings.xml and such.


R.java is dynamically created, either by the IDE when it detects changes to resources, or by the ant build script before Java compilation. aapt does the real work.

It's useful to have R.java available when editing in an IDE so that the auto-complete functionality finds R.whatever, but it isn't strictly necessary. Please read here for details on the build process.

Hope this helps,

Phil Lello

0

精彩评论

暂无评论...
验证码 换一张
取 消