I didn't know about the assets directory. on the TekPub tutorial they
just put the *.jar files in the assets directory so i just did that.
I did remeber to create the module class. (i would also expect an
other error message.. but mabe that is just me :S)
But i made an lib folder and put the jar files in there. but it still
gives me the same error :(
On Apr 12, 8:25 pm, Andrew Toulouse <
toulo...@crunchyroll.com> wrote:
> Also, did you remember to create the module class?
>
> --Andy
>
>
>
>
>
>
>
> On Thursday, April 12, 2012 at 11:21 AM, Graphene wrote:
> > I have the roboguice-2.0-RC1.jar & guice-3.0-no_aop.jar in the eclips
> > assets directory, and have already added them to the build path. (They
> > appear in the virtual folder Referenced Libraries)
>
> > I have just added the xml but that didn't fix the problem :(
>
> > The naming thing should not prevent roboguice from working right? (i
> > will change)
>
> > On Apr 12, 8:04 pm, Andrew Toulouse <
toulo...@crunchyroll.com (
http://crunchyroll.com)> wrote:
> > > Make a libs/ directory, place the roboguice jar in it, then in Eclipse, open the libs folder, right click the RoboGuice jar, and add it to your build path. Then try extending from RoboActivity (or RoboFragmentActivity).
>
> > > Also note that you need the Android Compatibility Library to use RoboGuice - you can download it from Google via the SDK Manager (look for "Extras" -> "Android Support"). You'll want to find that in your Android SDK directory (in a subfolder of extras somewhere), and also copy that to libs/ and add to build path.
>
> > > If you're using RoboGuice 2.0 you don't need a custom Application class, you can just create a file roboguice.xml in res/values/ (so that'd be res/values/roboguice.xml) with the following contents:
>
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <resources xmlns:tools="
http://schemas.android.com/tools" tools:ignore="UnusedResources">
> > > <string-array name="roboguice_modules">
> > > <item>com.MyFirstApp.AppModule</item>
> > > </string-array>
> > > </resources>
>
> > > And then create a class called "AppModule" (really, the name can be whatever you want, though) in the com.MyFirstApp package. This class should extend from com.google.inject.AbstractModule. This also means that you should have Guice 3.0 in your build path. Get the one with "no aop" - this AOP stuff won't work on Android.
>
> > > Also, something to note - packages should usually be lowercase. Convention is often:
> > > com.blah.package
> > > ClassName
> > > methodName
> > > variableName
>
> > > package names are usually prefixed with a reversed domain name, which is why you've got stuff like com.google.inject - it's
google.com (
http://google.com) -> inject.