Android appcompat v7 error

2019-01-15 12:34发布

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...)

9条回答
狗以群分
2楼-- · 2019-01-15 12:58

Appcompat_7 error solved!

Hi, im a complete beginner, i solved my problem by go to SDK manager update/install all the new android sdk build tools (as im not sure which is which i should update/install so i update/install all the build tools. after updated/installed all the new build tools i closed my eclipse and relaunch the eclipse again. if you see any error again? go to the top bar click PROJECT and choose CLEAN. and run your application again and i think it will work fine..

查看更多
小情绪 Triste *
3楼-- · 2019-01-15 13:00

I had the same problem and I tried all of mentionded above advices and much more from, but no one helped me to solve my issue. My solution was creating a progect with minimum required SDK API 14: Android 4.0 (IceCreamSandwich). Doing this way Eclipse will not create appcompat_v7 project.

Also I found another, better, solution:

  1. Go to Android SDK Manager and install Android 5.0.1 (API 21) or newer. If you don't use the emulator you can install only SDK Platform and Google APIs;
  2. Go to appcompat_v7 -> Properties -> Android and check Android 5.0.1 in the Project Build Target;
  3. Then go to Java Build Path -> Order and Export and check Android 5.0.1;
  4. Do the same procedure for your project.
查看更多
地球回转人心会变
4楼-- · 2019-01-15 13:01

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")

查看更多
叛逆
5楼-- · 2019-01-15 13:04

I solved it by downloading the file manually somewhere on the internet (be careful) and putting it into the needed \appcompat_v7\bin\ folder before creating a new Android project. After that, also my R.java file was generated successfully.

Honestly, no other way seemed to fix it. Could not obtain the file via the SDK manager.

查看更多
相关推荐>>
6楼-- · 2019-01-15 13:07

Strange fix but this worked for me ( My minimum SDK for my project is 10 - can't use 14)

  1. Right-click on the "appcompat_v7" project and go to -> Properties -> Android.
  2. Your target build should already be set at the latest build (in my case Android 5.0.1). Click any other android package (apart from its current target) and click "Apply". Click "Ok" to close the box.
  3. Re-open the Properties box by the same method but this time check the latest build (in my case Android 5.0.1) as the Project Build Target. Click "Apply", then "Ok" to close the box.
  4. Clean the appcompat_v7 project. You'll probably need to clean/build all other projects that reference this library.

This solved it for me.

查看更多
\"骚年 ilove
7楼-- · 2019-01-15 13:10

I was having with same Issue and fed up but finally I got the answer . I resolved this by Copy appcompat library E:\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat and paste appcompat Library in the the Project which I want to Import . I close the Eclipse and reopen. But One thing I want to consider before these stuff I updated Android Support Repository and Android Support Library as well.

查看更多
登录 后发表回答