if it's just a project (especially someone else's project) that's a problem, The solution is to add the missing jar package. The steps are as follows:
- 1. In Eclipse, right-click the current project and select Properties
- 2. Select Java Build Path
- 3. Select Libraries tab and click on the Add External jars button on the right panel.
- 4. Select the Android-support-v4.jar file in your andriod SDK directory: \android-sdks\extras\android\support\v4\android-support-v4.jar
if the new Android project will be error android.support.v7.app.ActionBarActivity, it may be an issue with the SDK
cause of error:
- This problem arises because you upgraded ADT (that is, eclipse, which corresponds to SDK21 or 5.0), but did not upgrade the SDK (including SDK Tools,platform Tools,build Tools), When you create a project with a new version of Eclipse, the new version of the support V7 package is used by default, and the new version of support V7 changes compared to the old version (such as style, theme, and so on), if the reference is Before the old project Appcompat_v7, some of the properties are not found in the new, so the error.
- In addition, with the new version of ADT, Target SDD is the latest version by default (even if you do not have this version of the SDK locally), even if you speak the target SDK to a lower version, the default will still refer to the new version of the support V7 package.
The normal situation is this:
workaround One (eradication method):
http://download.csdn.net/download/u013161218/8077247
Solution Two (fast method):
- 1. Change
- 2, the project right---properties--> android--> Remove the V7 library referenced below
- 3, delete the reference to the style of the error style (or you can delete the file directly) , delete the attribute of the reference to the error in the menu (or you can delete the file directly) , delete the subject of the quoted error in the list file theme , the code will inherit from actionbaractivity to inherit activity and re-guide the package.
In Android development, new projects may be resolved by missing a reference to the Sopport project.
1. Project right--------Android---Existing android Code into workspace
--Select: \sdk\extras\android\support\v7\appcompat (choose according to your own file storage path)
-Tick copy projects into workspace--and finish
(If unable to resolve target ' android-16 ' appears, modify project.properties)
2. Referencing android.support.v7 in the project
Project right---------------------
http://www.cnblogs.com/peach/p/3991047.html
From for notes (Wiz)
Eclipse Import New Android project error SUPPORT.V7 v4