Eclipse Import AppCompat Project error

Source: Internet
Author: User

Tags: Android

When we import an open source project in Eclipse, we often find that a style similar to Theme.AppCompat.Light.DarkActionBar is not found, and the solution is simple: import com.android.support. Appcompat-v7 bag, but two points to note:

You cannot import only Appcompat-v7.jar packages, but import APPCOMPAT-V7 projects

Because this project contains a resource file, only the import jar package has no effect, this project address is in:
... \android-sdk\extras\android\support\v7 under. The following steps are as follows:

  • File->import (ANDROID-SDK\EXTRAS\ANDROID\SUPPORT\V7) Select "AppCompat"

  • Right-click on your Project > properties->android. Click on "Add" to add "AppCompat" item

  • It's so simple.

Add "AppCompat" times wrong

There was a weird problem today when I clicked on the Add "AppCompat" project and there was this weird situation:

It took a while to find the reason in StackOverflow:

I downloaded the item from GitHub, saved it in C, and then import it into Eclipse, and my Android SDK path was on D drive.

If the Support-library project and your own project are no longer the same disk, there will be the above problem, which should be considered an eclipse bug, it is a pit.

Once you understand the reason, the solution is simple, choose Copy protects into workspace when you import the project, provided your workspace path and the Android SDK project are on the same disk.

Eclipse Import AppCompat Project error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.