Issue
Android R IDs are generated by the IDE (Android Studio or Eclipse ADT).
Are they identical between builds?
If yes, will they be the same if generated on different machines?
Solution
Firstly, Android IDs are not generated by the IDE but by aapt, a command line tool which is run during a build. Yes, the IDE ultimately triggers it, but it isn't strictly part of Android Studio, it's part of the build tools package.
The numbers are essentially assigned alphabetically, so the resource IDs will be identical for the same project - but not if you modify the resource file tree. I am only prepared to guarantee that on the same file system, operating system and version of build tools. If you change any of those, all bets are off.
Ultimately, relying on this would be a really bad idea, because someone will break it by modifying the project one day, probably sooner rather than later.
I looked into this fairly extensively some years ago when I wrote an APK decompiler for the purposes of patching in resources.
Answered By - Airsource Ltd
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.