java - Android appcompat v7 error -


being new android developent followed simplest of tutorials, built new android project, accepting default settings (built kitkat). dismay have un-planned project - appcompat_v7, along errors:

the container 'android dependencies' references non existing library 'c:\users...\workspace\appcompat_v7\bin\appcompat_v7.jar'

and twice following

the project cannot built until build path errors resolved

is there quick way fix these? sign of how difficult, , bugged unpleasant surprises learning android going be?

(hope not similar learning ios 6 years ago...)

the appcompat_v7 library added default in eclipse android project. need demo projects start making.

to correctly add library, follow these steps

for android studio:

1. ensure have android support repository installed in sdk manager:

enter image description here

2. in build.gradle file, include following compile statement

compile 'com.android.support:appcompat-v7:+' 

in dependency bracket.

3. perform gradle sync sync project button.


for eclipse:

the trick is, need clean & build appcompat_v7 project. go

project -> select clean -> select project.  

after doing this, if project not built automatically, right click on project in package explorer , select build project. .jar file generated in project's bin folder. after that, clean & build projects reference appcompat_v7.

now library should correctly referenced projects need it.

note that:

  • you must have latest versions of sdk tools / build tools / platform tools. if try , doesn't work, go android sdk manager , make sure have latest versions of required tools.
  • in case project requires api level 14 (ice cream sandwich) & above, select api level 14 "minimum required sdk" in project wizard when create new project. appcompat_v7 library not required project, , application use native actionbar class present in aosp builds ics onwards.

further references:

1. how add android support v7 libraries in eclipse.

2. android actionbar how add supporting library v7 appcompat eclipse.

3. android-support-v7-appcompat library project won't work.

4. difference between android-support-v7-appcompat , android-support-v4.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -