Indeed - createPackageContext is not a static method.

The compiler is correct :)

Calling createPackageContext requires that you have a Context object. This
can be a Context that corresponds to your package.

-- Kostya

3 декабря 2011 г. 23:01 пользователь Matt Clark <[email protected]>написал:

> Still getting the error:
> Cannot make a static reference to the non-static method
> createPackageContext(String, int) from the type Context
>
> On Dec 3, 1:52 pm, Kostya Vasilyev <[email protected]> wrote:
> > createPackageContext takes a String as the first parameter, so it shoud
> be
> > createPackageContext("your.package.name.here"...). Note the double
> quotes.
> >
> > Don't think you need the "ignore security" flag in this case, just to
> load
> > the resources.
> >
> > -- Kostya
> >
> > 3 декабря 2011 г. 22:45 пользователь Matt Clark <[email protected]
> >написал:
> >
> >
> >
> >
> >
> >
> >
> > > I have no idea how to set that up, I found an example that would use:
> >
> > > Context r =
> >
> > >
> Context.createPackageContext(tinyClark.android.libraries.LanguagePack,Conte
> xt.CONTEXT_IGNORE_SECURITY);
> >
> > > But i get an error that tinyClark.android.libraries.LanguagePack
> > > cannot be resolved to a variable, and when i try to fix it it creates
> > > a new class in tinyClark.android.*
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Reply via email to