Which of the following are the specific problems I encountered in the project and some of my solutions? My environment is Mac OS, so some of these methods may not use other OS ~
1. An error is reported in POM. xml. The error prompt is:
Plugin execution not covered by lifecycle Configuration
This is because m2e Android connector is not installed. follow these steps:
Preferences-> Maven-> discovery and click"Open
Catalog". Then selectM2e Android connector can solve this problem after it is installed.
See http://blog.springsource.com/2011/10/18/upgrading-maven-integration-for-springsource-tool-suite-2-8-0/ for details
2. Right-click the project name and choose run.
As-> Maven install, the SDK cannot be found, and the following error is returned:
No
Android SDK path cocould be found.
The solution to this problem is in ~ /. Add setting in the M2 path. the XML file is used to specify the SDK path. for Mac OS, the path is this. Other operating systems may be different. The added file content is as follows:
<Settings xmlns = "http://maven.apache.org/SETTINGS/1.0.0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schemalocation = "http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <profiles> <profile> <ID> Android </ID> <Properties> <android. SDK. path> path/to/The/Android/SDK </android. SDK. path> </Properties> </profile> </profiles> <activeprofiles> <! -- Make the profile active all the time --> <activeprofile> Android </activeprofile> </activeprofiles> </Settings>
Path/to/The/Android/SDK must be an absolute path ~ /Android-sdks, you have to write/users/Lily/Android-sdks for your path. Otherwise, you will still be unable to find the SDK, right-click Maven install and you will not be prompted to find the SDK, but you may still be unable to build success becauseCodeAn error is reported. See figure 3.
3. @ override all code reports an error. Only when this mark is removed can compile pass through
This problem was originally caused by JDK, but I have seen that my eclipse is jdk1.6, and other Maven projects are useless, it must have been caused by the use of JDK for Maven compilation. On the Internet, I found a solution in pom. add the following section to the XML file:
<Plugin> <groupid> Org. apache. maven. plugins </groupid> <artifactid> Maven-compiler-plugin </artifactid> <version> 2.1 </version> <configuration> <source> 1.6 </source> <target> 1.6 </Target> </configuration> </plugin>
Used to indicate the use of jdk1.6. After modificationRight-click the project and choose Maven> Update project configuration. The previous errors are solved ~~
More detailed can refer to the http://lwjlaser.iteye.com/blog/1158459