我更新了ADT插件的最新版本(20)和Android的SDK工具。 现在,当我尝试导入一个存在的Android的Maven到Eclipse引发异常An internal error occurred during: "Importing Maven projects". com/android/io/StreamException
An internal error occurred during: "Importing Maven projects". com/android/io/StreamException
,并创建Eclipse项目,但像以前一样不喜欢Android项目。 以前存在的(Maven的机器人)项目工作区中的正常工作。
Eclipse的完全异常跟踪,当导入项目如下:
!ENTRY org.eclipse.osgi 2 1 2012-06-29 19:02:34.421
!MESSAGE NLS unused message: LifecycleMappingPropertyPage_this_message in: org.eclipse.m2e.core.ui.internal.messages
!ENTRY org.eclipse.core.jobs 4 2 2012-06-29 19:03:03.953
!MESSAGE An internal error occurred during: "Importing Maven projects".
!STACK 0
java.lang.NoClassDefFoundError: com/android/io/StreamException
at me.gladwell.eclipse.m2e.android.project.EclipseAndroidProjectFactory.createAndroidProject(EclipseAndroidProjectFactory.java:17)
at me.gladwell.eclipse.m2e.android.project.EclipseAndroidProjectFactory.createAndroidProject(EclipseAndroidProjectFactory.java:1)
at me.gladwell.eclipse.m2e.android.AndroidMavenProjectConfigurator.configure(AndroidMavenProjectConfigurator.java:62)
at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:109)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:414)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.configureNewMavenProject(ProjectConfigurationManager.java:240)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:156)
at org.eclipse.m2e.core.ui.internal.wizards.MavenImportWizard$1.doCreateMavenProjects(MavenImportWizard.java:164)
at org.eclipse.m2e.core.ui.internal.wizards.AbstractCreateMavenProjectsOperation.run(AbstractCreateMavenProjectsOperation.java:73)
at org.eclipse.m2e.core.ui.internal.wizards.MavenImportWizard$3.runInWorkspace(MavenImportWizard.java:249)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: com.android.io.StreamException
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 12 more
有谁能够解决呢? 需要对Android的M2E连接器的更新?
更新:这是我的pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>your.company</groupId>
<artifactId>my-android-application</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>apk</packaging>
<name>my-android-application</name>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>2.3.3</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.2.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<!-- platform or api level (api level 4 = platform 1.6)-->
<platform>10</platform>
</sdk>
</configuration>
</plugin>
</plugins>
</build>
</project></project>
谢谢。