Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Could not find class 'android.support.v4.app.FragmentActivity'" Error

I'm getting the following error:

> 02-06 23:10:24.104: E/dalvikvm(912): Could not find class
> 'android.support.v4.app.FragmentActivity', referenced from method
> com.robotium.solo.Waiter.getSupportFragment

When running a project I'm using for Programming Mobile Applications for Android Handheld Systems on Coursera.I believe this error is somehow related to my output answer being considered incorrect. if I can fix this error,I can fix my output.

I didn't have the latest version of Android Support Repository (not installed) when I initially ran my tests,but I now have the latest version of Android Support Repository according to the SDK Manager (v4),and have even restarted Eclipse and the emulator,but I'm still getting the error.

How can I fix the LogCat claiming ASR doesn't exist when it's installed according to the SDK?

like image 713
Kurt Wagner Avatar asked Feb 07 '14 04:02

Kurt Wagner


2 Answers

You need to add the support library com.android.support:support-v4

On Android Studio, go in the menu File > Project Structure (Ctrl + Alt + Shift + S) Select app, tab Dependecies, and in the + and search for the Maven libraries that you will use. In your case, the com.android.support:support-v4 enter image description here

like image 41
Jordan Junior Avatar answered Sep 20 '22 17:09

Jordan Junior


If there is no "libs" folder then create one

then click

Project> Android Tools >Add support Library.

This will help you. Finally clean the project and restart Eclipse

like image 50
Mayank Saini Avatar answered Sep 20 '22 17:09

Mayank Saini