• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Changing the auto-generated Java files

StevenHu

Member
Where do I make changes so the auto-generated R.java file in the /gen/ folder will be updated appropriately?

package com.THIS-PART.AND-THIS-PART-NEEDS-TO-BE-CHANGED;

public final class R {
public static final class attr {
}
public static final class drawable {
public static final int icon=0x7f020000;
}
public static final class layout {
public static final int main=0x7f030000;
}
public static final class string {
public static final int app_name=0x7f040001;
public static final int hello=0x7f040000;
}
}

Thanks!
 
You can't change the generated files. Even if you do, it will revert back to what it generated.
 
Obviously, then, I'll have to start over. Is there any way to salvage what I have so far? I thought I could make one as a template and copy/paste to make a new one. That's not going to work?

Thanks!
 
Nope it won't work it will always be autogenerated and it is'nt a file you want to be messing wih. If you have an error that has deleated your R.java use project clean in the menu to get it back.

Mostley if you have a problem with R.java you have a problem in an xml file
 
Okay, thanks for saving me hours of tracking this down. I'll start from scratch and use my "template" for adding notes that explain what to do on each page.
 
Also - Changing the package name in the R. file, wouldn't that be done by changing it in the Manifest and making sure that the package actually exists in the source?
 
Back
Top Bottom