Being new to Android developent I followed the simplest of tutorials, built a new android project, accepting all default settings (built it for kitkat). To my dismay I have an un-planned project - appcompat_v7
, along with the errors:
The container 'Android Dependencies' references non existing library 'C:\Users...\workspace\appcompat_v7\bin\appcompat_v7.jar'
and twice the following
The project cannot be built until build path errors are resolved
Is there a quick way to fix these? Is this a sign of how difficult, and bugged with unpleasant surprises learning Android is going to be?
(Hope it will not be similar to learning IOS 6 years ago...)
Android AppCompat Library V7 The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 14 or later. License.
400. An Android support library that enables the use of the ActionBar and Material Design specific implementations such as Toolbar for older devices down to Android v2.
When new versions of android are published, Google will have to support the older versions of android. So AppCompat is a set of support libraries which can be used to make the apps developed with newer versions work with older versions.
The appcompat_v7
library is added by default to an Android project. You will most likely need it for any demo projects you start making.
To correctly add this library, follow these steps:
For Android Studio:
1. Ensure that you have the Android Support Repository installed in your SDK Manager:
2. In your build.gradle
file, include the following implementation
statement
implementation 'com.android.support:appcompat-v7:+'
within the dependency
bracket.
3. Perform a Gradle sync with the Sync Project
button.
~LEGACY ANSWER~:
For Eclipse:
The trick is, you need to clean & build the appcompat_v7
project. Go to
Project -> select Clean -> select the project.
After doing this, if the project does not get built automatically, right click on the project in the package explorer and select Build Project
. Now the .jar
file will be generated in the project's bin
folder. After that, clean & build all projects that reference appcompat_v7
.
Now the library should be correctly referenced by all projects that need it.
Note also that:
Further References:
1. How to add Android Support v7 libraries in eclipse.
2. Android actionbar how to add supporting library v7 appcompat for Eclipse.
3. android-support-v7-appcompat library project won't work.
4. Difference between android-support-v7-appcompat and android-support-v4.
The accepted answer worked for me but only after I'd installed the latest Java JDK (which was a solution to the problem detailed here Android - "Parsing Data for android-21 failed")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With