Exception in thread "pool-1-thread-1"java.lang.NoClassDefFoundError:org/eclipse/aether/spi/connector/Transfer$State
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:608)
我使用以下脚本构建
<?xml version="1.0" encoding="UTF-8"?>
<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>com.example.helloworld</groupId>
<artifactId>HelloWorld</artifactId>
<version>0.1.0</version>
<packaging>apk</packaging>
<properties>
<!-- use UTF-8 for everything -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v4</artifactId>
<version>21.0.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.9.0-rc.1</version>
<configuration>
<sdk>
<platform>21</platform>
</sdk>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>true</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
尝试在谷歌进行更改和搜索没有找到解决方案,请帮助我
答案 0 :(得分:15)
似乎 android-maven-plugin 与 maven 版本3.2.5及更高版本之间存在兼容性问题。
对我来说,它适用于3.2.3,当我使用3.2.5和3.3.1时, NoClassDefFoundError 异常失败
尝试从档案中下载较旧的maven版本 http://archive.apache.org/dist/maven/maven-3/3.2.3/
修改
此问题已在 android-maven-plugin 的更高版本(testet with 4.1.1)中修复。插件已移至github,并重新定位到新的groupId。
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>4.1.1</version>
</plugin>
新项目位置: https://github.com/simpligility/android-maven-plugin/
答案 1 :(得分:0)
maven 3.2&amp; amp; 3.3。试试这个:
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
cleansession true