Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
221 views
in Technique[技术] by (71.8m points)

android - If I use new " V7 Appcompat library ", do I still need " V4 Support Library " for a minimum SDK = 7?

I am migrating from Action Bar Sherlock to Action Bar compat. I remove ABS and I had support-v4-google maps in it, I got errors. I will add the v4 directly to the project now to see if it solve, but I want to know:

I don't really understand from the documentation if libraries are redundant or complementing?

Thanks for advice, pointers etc.

EDIT: This is the error that make me added v4 with "external jar... " It solve it.

The type android.support.v4.app.TaskStackBuilder$SupportParentable cannot be resolved. 
It is indirectly referenced from required .class files

But if u say i should not add v4 if already have v7 how do I explain it to Eclipse?

Relevant post, the solution was to add v4 here. The hierarchy of the type activity is inconsistent when extending ActionBarActivity

Edit 2: The v4 jar is included in the v7 library project if done following these steps point by point: http://developer.android.com/tools/support-library/setup.html#add-library My setup is :

  • Android 4.3 : unchecked
  • APrivate Lib: unchecked
  • v7-app.../src : checked
  • v7-app.../gen : checked
  • ADependencie: unchecked
  • raw v7 jar : check
  • raw v4 jar : check
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

v7 includes the v4 support library so there is no need to have it in there again

if you look in the libs folder of the v7 support library you will see that the v4 jar is already referenced in the library


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...