Pregunta

guys, with my friend started working on a school project - developing a java app for android. He started it, now it's my turn to do my job, so i got the code he already has, set up Android SDK for Eclipse and downloaded all the neccessary files and packages, but it still gives me errors and I can't even run the project. One of the errors (the main one, I think) is that it can't import android.support.v7.app.ActionBarActivity If anyone knows what can I do (I've tried all kinds of solutions from the internet, but none work) I would be very grateful. Here is a screenshot of the code http://s17.postimg.org/8aw952lha/Capture.jpg

¿Fue útil?

Solución

See if you have imported the ActionBar project to your Eclipse workspace, also, right click on your project->properties->android and check that you have referenced/linked the ActionBar project there.

If you are using a repository without the proper ignore files it is possible that you have imported your partners configurations and then have the references to the auxiliary projects broken (you just need to update that).

Hope it helps.

Otros consejos

android.support.v7.app.ActionBarActivity is a support library. This allows older versions of Android (before native support for an action bar was available) to use the action bar.

Since you are having difficulty importing it, I'd assume you do not have the support library installed.

Full instructions are available here: http://developer.android.com/tools/support-library/setup.html

A snippet for adding support libraries to Eclipse:

  1. Make sure you have downloaded the Android Support Library using the SDK Manager.
  2. Create a libs/ directory in the root of your application project.
  3. Copy the JAR file from your Android SDK installation directory (e.g., /extras/android/support/v4/android-support-v4.jar) into your application's project libs/ directory.
  4. Right click the JAR file and select Build Path > Add to Build Path.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top