Khaino
Khaino

Reputation: 4169

android support-v7-appcompat/gen(missing)

I imported android support-v7-appcompat into my workspace and it is showing an error

android support-v7-appcompat/gen(missing) 
in Properties --> Java Build Path -->Order and Export

I cleaned and rebuilt but the error still remains

Upvotes: 0

Views: 2522

Answers (2)

Nithin Np
Nithin Np

Reputation: 190

in your project properties change your target to android-21.you should have the latest api 21 sdk platform

Upvotes: 1

Akshay Saxena
Akshay Saxena

Reputation: 33

To add this library :

Using Eclipse :

Create a library project based on the support library code:

Make sure you have downloaded the Android Support Library using the SDK Manager.
1. Create a library project and ensure the required JAR files are included in the project's build path:
   2. Select File > Import.
   3. Select Existing Android Code Into Workspace and click Next.
   4. Browse to the SDK installation directory and then to the Support Library folder. For example, if you are adding the appcompat project, browse to <sdk>/extras/android/support/v7/appcompat/.
   5. Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.
   6. In the new library project, expand the libs/ folder, right-click each .jar file and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both the android-support-v4.jar and android-support-v7-appcompat.jar files to the build path.
   7. Right-click the library project folder and select Build Path > Configure Build Path.
   8. In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.
   9. Uncheck Android Dependencies.
   10.Click OK to complete the changes.

You now have a library project for your selected Support Library that you can use with one or more application projects.

Add the library to your application project:

  1. In the Project Explorer, right-click your project and select Properties.
  2. In the category panel on the left side of the dialog, select Android.
  3. In the Library pane, click the Add button.
  4. Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.
  5. In the properties window, click OK.

Using Android Studio :

Make sure you have downloaded the Android Support Repository using the SDK Manager.


1. Open the build.gradle file for your application.
2. Add the support library feature project identifier to the dependencies section. For example, to include the appcompat project add compile "com.android.support:appcompat-v7:18.0.+" to the dependencies section, as shown in the following example:

dependencies {
    ...
    compile "com.android.support:appcompat-v7:18.0.+"
}

Upvotes: 0

Related Questions