Error "package android.support.v7.app does not exist"

Alexander Otavka

I am new to android development, and I have been using the command line tools to create an android project. I followed all the instructions given in the tutorial at android developers. However, they are focused more on IDE users.

When I tried extending my MainActivity class from ActionBarActivity instead of just Activity, it threw the following error.

error: package android.support.v7.app does not exist

It was complaining about this import statement.

import android.support.v7.app.ActionBarActivity;

I made sure to visit the SDK manager, and it says Android Support Library is installed. I am truly stumped on this one, and I would really appreciate any help you guys could give me.

This might help: http://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html

vgonisanz

Your project is missing the support library from the SDK.

If you have no installed them, just right click on the project > Android Tools > Install support library.

Then, just import into workspace, as an Android project, android-support-v7-appcompat, located into ${android-sdk-path}/extras/android/support/v7

And finally, right click in the Android project > Properties > Android Tab. Push the Add button and add the support project "android-support-v7-appcompat" as dependency.

Clean your project and the must compile and work properly.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related