I've spent hours trying to get Roboguice to work, but with no success. My latest effort involved trying to get the Astroboy example to work but I've run into problems after (eventually) getting it to deploy.
This is a summary of my steps performed:
- Installed a clean copy of Apache Maven 3
- Installed a clean copy of the Android SDK and downloaded all available platforms
- Installed and ran the Maven Android SDK Deployer so all artifacts were downloaded etc
- Downloaded a clone of the Astroboy example
- Performed mvn clean install to build roboguice and astroboy. Test failed as I didn't have a platform 9 downloaded. No idea why it was referencing what seems to be an obsolete API so I ran this command to download even obsolete APIs: android update sdk --no-ui --obsolete --force
- Performed mvn clean install again and it built successfully this time
Performed mvn android:deploy and android:run. Successful except with this warning:
[WARNING] [WARNING] Some problems were encountered while building the effective model for org.roboguice:astroboy:apk:2.0-SNAPSHOT [WARNING] 'parent.relativePath' points at org.roboguice:roboguice-aggregator ins tead of org.sonatype.oss:oss-parent, please verify your project structure @ line 104, column 13 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten t he stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support buildin g such malformed projects. [WARNING]
Ran the application and get this error now:
11-22 03:45:35.470: E/AndroidRuntime(2437): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.roboguice.astroboy/org.roboguice.astroboy.activity.AstroboyMaster Console}: com.google.inject.internal.util.$ComputationException: java.lang.NoClassDefFoundError: android.support.v4.app.FragmentManager
Can anyone help me with this issue? I've followed all the instructions but have no idea what the issue is now.
Thanks