简体   繁体   中英

Android dependancies configuration

I am going through the Android app tutorial here:

http://developer.android.com/training/basics/actionbar/styling.html

As part of what I am doing I added in the appcompat library as part of adding in the themes. Not sure how I got to this point but when I try to run the app I get the error :

"The container 'Android Dependencies' references non existing library 'D:\\eclipse-bundle\\sdk\\extras\\android\\support\\v7\\appcompat\\bin\\android-support-v7-appcompat.jar'"

The library DOES exist, just not at this location. It is located at:

D:\\eclipse-bundle\\sdk\\extras\\android\\support\\v7\\appcompat\\libs\\android-support-v7-appcompat.jar

There does not appear to be any way to edit this property. How do you fix this problem? what is causing it?

Thanks in advance for any help.

Make sure you follow this step to add .jar files.

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.

I had the same issue so I CMD+Q'd Eclipse and re-opened it.... magically worked. I guess "turning it off an on again" works sometimes :D

You can select your project on eclipse, then right-click...

A menu should appear, you can click on "properties".

A flying screen should appear, you can click on "Java Build Path"

Another flying screen should appear, you can click on the tab "Libraries"

This tab actually hold references to what is in the "libs" folder, and you can delete your old lib and insert your new lib (with the correct path) there.


Would not recommend any of it, actually... Please just import the "support lib project" into your eclipse workspace and make your project reference the imported project as a "lib project".

That is way more handy, and will actually give you a better flexibility for doing more stuff with compatibility lib.

And also, since it is on your workspace, you are the one that compiles it. No future lib reference problems \\o/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM