Simple android application with roboguice throwing exceptions

android, roboguice

Solution

Well i found out what the problem was. i was using SDK v17+ and in that version external library's need te be placed in a "libs" folder and only in the libs folder. so all the tutorial's i found where they just put it in the assets folder where wrong.

Link to where i got the answer i was looking for: http://groups.google.com/group/roboguice/browse_thread/thread/474116b052050ae2

Problem

I have a very simple application that works but when i add roboguice it throws java.lang.RuntimeException: Unable to instantiate application com.MyFirstApp.MyFirstApplication: java.lang.ClassNotFoundException: com.MyFirstApp.MyFirstApplication The application class: ``` public class MyFirstApplication extends RoboApplication { @Override protected void addApplicationModules(List<Module> modules) { //modules.add(new DefaultModule()); } } ``` The MainActivity: ``` public class MainActivity extends RoboActivity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } ``` the manifest: ``` <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.MyFirstApp" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="14" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:name="MyFirstApplication"> <activity android:name="com.MyFirstApp.Activities.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> ``` I have put guice-2.0-no_aop.jar and roboguice-1.1.3.jar in the assets folder and added them to the buildpath. when i remove the robo part it works fine. can anyone tell me what i did wrong.

Original source