Hi,

Depending on what version of JB you are using you should either use the 
public.xml or symbols.xml to add your new id's.

Adding new id's to public.xml was abandoned in this commit:
http://git.omapzoom.org/?p=platform/frameworks/base.git;a=commitdiff;h=9d9ece3c1e16001b63244459cdf4b428f4272d2e

An easy way to find the symbols is:

1) add the new id to your xml
2) run "make -j4 2>&1 | sed -n -f 
frameworks/base/core/res/MakeJavaSymbols.sed | sort -u"
will generate a output like this:

 <java-symbol type="id" name="new_id_1" />
 <java-symbol type="id" name="new_id_2" />

3) add the above to either:
frameworks/base/core/res/res/values/symbols.xml
or 
frameworks/base/core/res/res/values/public.xml

Best regards,
Mikkel Christensen


On Saturday, August 4, 2012 11:51:49 PM UTC+2, Alexandre Dumont wrote:
>
> Thanks Jeffrey for the tip. Is it something new since JB? I don't remember 
> needing that neither in GB nor ICS. 
>
> Any link where more info about this can be found? I've search Google but I 
> couldn't find any relevant info, excep this thread on Google Groups.
>
> THanks in advance,
> Alex
>
> On Friday, July 27, 2012 8:08:49 PM UTC+2, Jeffrey Brown wrote:
> > Add the id to public.xml as a java-symbol element in the top part of the 
> file where all of the private symbols are declared.
> > 
> > On Jul 26, 2012 9:23 AM, "Nathan Barraille" 
> > <nathan.b...@gmail.com<javascript:>> 
> wrote:
> > 
> > Hello,
> > I am trying to add a TextView in 
> frameworks/base/core/res/res/layout/keyguard_screen_unlock_landscape.xml, 
> with a specific ID so that I could reuse it in the Java code, but it looks 
> like this ID is never added to com.android.internal.R.java, so every time I 
> try to access it from the java code, I get a "cannot find symbol" error.
> > 
> > 
> > 
> > I tried just to build the res folder (mmm frameworks/base/core/res), the 
> whole framework part (mmm frameworks/base) or even recompile the whole 
> system (make), but this resource is never available.
> > 
> > 
> > 
> > Thanks.
> > 
> > 
> > 
> > 
> > -- 
> > 
> > unsubscribe: android-porti...@googlegroups.com <javascript:>
> > 
> > website: http://groups.google.com/group/android-porting
>
> On Friday, July 27, 2012 8:08:49 PM UTC+2, Jeffrey Brown wrote:
> > Add the id to public.xml as a java-symbol element in the top part of the 
> file where all of the private symbols are declared.
> > 
> > On Jul 26, 2012 9:23 AM, "Nathan Barraille" 
> > <nathan.b...@gmail.com<javascript:>> 
> wrote:
> > 
> > Hello,
> > I am trying to add a TextView in 
> frameworks/base/core/res/res/layout/keyguard_screen_unlock_landscape.xml, 
> with a specific ID so that I could reuse it in the Java code, but it looks 
> like this ID is never added to com.android.internal.R.java, so every time I 
> try to access it from the java code, I get a "cannot find symbol" error.
> > 
> > 
> > 
> > I tried just to build the res folder (mmm frameworks/base/core/res), the 
> whole framework part (mmm frameworks/base) or even recompile the whole 
> system (make), but this resource is never available.
> > 
> > 
> > 
> > Thanks.
> > 
> > 
> > 
> > 
> > -- 
> > 
> > unsubscribe: android-porti...@googlegroups.com <javascript:>
> > 
> > website: http://groups.google.com/group/android-porting
>
>

-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to