Android developers have recently discovered that after updating ADT to 22.6.0, a new Setup project will appear, and the contents of the appcompat_v7 are created. and create a new content that will appear. What the hell is going on here? The original appcompat_v7 is Google's own one of the compatibility package, is a support library, can make more than 2.1 full use of the 4.0 version of the interface. The following let the author take you slowly approached this problem and solve it.
Problem analysis
First we open eclipse, create a new Android project, where the name is "test", all the way to the default next down, and finally "finish" to complete the project creation.
You will find that after the project has been created, in addition to the "Test" project we created, there is a package called "Appcompat_v7", and the package shows an error (red X), while the "test" package displays a red exclamation mark. Workspace.
If you do not get used to the automatic generation of appcompat_v7 packages and delete This package, then the "test" package will be a lot of errors. So how do you settle this series of questions? Take a look at the workaround below.
Workaround
First solve the project after the completion of the APPCOMPAT_V7 package error. The test package has a red warning issue.
Click "Project" on the menu bar, select "Clean", then "OK", and when clean is complete, you will find the APPCOMPAT_V7 package error. The problem with the red warning in the test package has been resolved, except that the test package has a yellow warning, just because the import class in Test's Java file is not being used, so it is completely out of control.
If it does not work, then right-click Appcompat_v7 package, select Properties, click "Android", if the library under the "Is Library" box is not checked, tick, click "OK", then follow the above steps to perform "clean" Operation.
After the APPCOMPAT_V7 package is deleted, the test project has various errors, stating that the test project is dependent on the APPCOMPAT_V7 package, so this APPCOMPAT_V7 package cannot be deleted. Then you don't have to take care of the bag, just do your project.
- Click on the menu bar "Project"--properties--Java Build Path--order and Export--select all, then reboot, OK,
If you're still brooding over the appcompat_v7 bag, I'll tell you how to build a project without the APPCOMPAT_V7 package. Since the APPCOMPAT_V7 package is a support library that allows more than 2.1 to use the 4.0 version of the interface, then we have to build the project to select the Minimum SDK above Android4.0 do not need this support library? The result proves that our idea is right.
New Android project, there will be two items one is a project created by itself, and the other is the "APPCOMPAT_V7" project, what's going on? How to solve it?