Hi Mark,

           Thanks for your reply.Right now we are not using the R file of
that project whose jar file is created.Jar file does not contains R files of
that project.So R.layout and R.id's are created in the client project where
i am using jar file.




--
Best Regards,
Atif Gulzar

I ◘◘◘◘ Unicode, ɹɐzlnƃ ɟıʇɐ



On Fri, Aug 28, 2009 at 12:10 AM, Mark Murphy <mmur...@commonsware.com>wrote:

>
> >         i am facing a problem in using jar file.I have created a jar
> > file and i am trying to use it in another project.I also copy the xml
> > files from res/layout folder of that project whose jar file is created
> > to the res/layout folder of the project in which i am using jar file.I
> > have also listed all the activites of jar in manifest file of that
> > project. But when i call an activity that is inside jar file it loads
> > the wrong xml file.I mean if inside an activity i have setContentview
> > (R.layout.test1) but it loads another file instead of test1.
> >
> > Any Help??
>
> You cannot reference resources by R.layout, R.id, and such from within a
> JAR such as what you have packaged. You need to adjust your API so the
> application reusing your JAR can pass those values in as parameters.
>
> What happens is that even though you copied over the resources, the
> resource IDs (the numbers that R.layout.foo and R.id.bar map to) will be
> different in the new project.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com
> Android App Developer Books: http://commonsware.com/books.html
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to