I have an Android project that includes links to a library project. The library project contains a resource (renderscript bytecode package). The main project also has its own resources, including a layout that contains a field that looks like this:
<EditText android:id="@+id/edit_name" />
When I build my main project in ant and I call findViewById(R.id.edit_name)at runtime, the call returns the EditText component that I expect. But when I clean up projects and create them in Eclipse findViewById(R.id.edit_name)returns null.
Debugging the call shows that my component is present in the view at runtime and actually has an assigned identifier, but this is not the same identifier as the value of R.id.edit_name (in this case, the identifier is in R. java and the runtime is R. id.edit_name == 0x7f070000, whereas the actual view that exists at runtime has mId == 0x7f080000)
Using the assembly ant R.java is created with R.id.edit_name === 0x7f080000 (which corresponds to the identifier that I observe when the application starts.)
When I remove the library dependency in Eclipse, R.java contains R.id.edit_name == 0x7f070000, but also the runtime, and everything works fine.
, - ADT/Eclipse ant , , , Eclipse. :
:
, Renderscript - renderscript, ( 07 .) , renderscripts , Eclipse, . , Eclipse ADT (22.2.1)