小编sai*_*ath的帖子

线程"pool-1-thread-1"中的异常java.lang.NoClassDefFoundError:org/eclipse/aether/spi/connector/Transfer $ State

Hii大家我正在尝试为Android项目生成自动化Maven构建脚本我正在使用Maven 3.2.5生成构建,并且在尝试为示例helloworld项目生成脚本时遇到以下问题

   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)
Run Code Online (Sandbox Code Playgroud)

我正在使用以下脚本进行构建

<?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>
Run Code Online (Sandbox Code Playgroud)

尝试在谷歌更改和搜索没有找到解决方案请帮助我

android building pom.xml maven

5
推荐指数
1
解决办法
4626
查看次数

子项可见性的 RecyclerView 问题

嘿伙计们,我正在创建类似于 whatsapp 的聊天应用程序,但在 RecyclerView 中面临 Childs Visibilties 的问题,它包含我的消息和来自服务器的消息我已经在单一布局中为我的消息和服务器消息定义了两个项目,我正在设置基于可见性在布尔值上;但项目没有正确渲染

适配器类:

public class MessageDetailsListAdapter extends RecyclerView.Adapter<MessageDetailsListAdapter.MessageViewHolder> {

private List<MessageModel> messagesList;
private Activity activityContext;
public MessageDetailsListAdapter(List<MessageModel> messagesList,Activity activityContext) {
    this.messagesList = messagesList;
    this.activityContext = activityContext;
}


@Override
public int getItemCount() {
    return messagesList.size();
}

@Override
public void onBindViewHolder(MessageViewHolder messageViewHolder, final int i) {
    final MessageModel msg = messagesList.get(i);
    if(msg.getIsMessageSentbyMe())
    {
        messageViewHolder.card_linear.setVisibility(View.GONE);
        messageViewHolder.messageTextMe.setText(msg.getMsgText());
        messageViewHolder.userNameMe.setText(msg.getSenderName());
        messageViewHolder.timeStampMe.setText(msg.getSentTime());
        messageViewHolder.card_linearMe.setOnLongClickListener(new OnLongClickListener() {

            @Override
            public boolean onLongClick(View v) {
                // TODO Auto-generated method stub
                Intent intent = new Intent(activityContext.getString(R.string.brMessageDetailsDeleteItem)); …
Run Code Online (Sandbox Code Playgroud)

android android-5.0-lollipop android-recyclerview

0
推荐指数
1
解决办法
992
查看次数