处理任务java.io.ioexception时出现异常:无法写入或读取 [英] Exception while processing task java.io.ioexception: can't write or read

查看:296
本文介绍了处理任务java.io.ioexception时出现异常:无法写入或读取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我添加了一个新的依赖项,当我尝试运行应用程序时,我开始出现以下错误:

 警告:处理任务java.io.IOException时的异常:无法写入[/Users/paularellano/Documents/Workbench/Android/Huddle/huddle_2.0 updt / Huddle_Android / build / intermediates / transforms / proguard / release / jars / 3 / 1f /main.jar](无法读取[/Users/paularellano/.android/build-cache/d4e5659d4f4fc411f22ba3f779b09d40beccc03f/output/jars/libs/internal_impl-23.0.1.jar(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;) ](复制zip文件[internal_impl-23.0.1.jar:android / support / v4 / view / WindowInsetsCompat.class]))

我尝试添加一个排除,但我不确定我应该排除删除这个重复的jar,任何帮助将不胜感激!先谢谢你!



GRADLE:

  compileSdkVersion 23 
buildToolsVersion '25 .0 .2'

依赖关系{
compile('com.google.android.gms:play-services-location:6.5.87'){
排除模块:'support- v4'
}
编译'com.android.support:appcompat-v7:23.0.1'
编译'com.android.support:support-v4:23.0.1'
编译'com.android.support:design:23.0.1'
编译'com.google.maps.android:android-maps-utils:0.4'
编译'info.hoang8f:android-segmented :1.0.6'

//展开的回收站视图**最近添加并且发生错误**
编译'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'

//测试
testCompile'junit:junit:4.12'
testCompile'org.robolectric:robolectric:3.1.4'

}

我也在职业防守队员中添加了这一行,但只是没有成功:

 -dontwarn com.bignerdranch。** 


解决方案

com.bignerdranch.android:expandablerecyclerview 库使用支持库版本 24.2.1 ,而你还导入了支持库版本 23.0.1


$ b 将您的支持库版本升级到 24.2.1 或从 expandablerecyclerview 库中排除支持库依赖项。

  compile('com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'){
exclude group:'com.android.support',module:'support-v4'
}

请注意,此可能中断 expandablerecyclerview 库,因为它是用更新的支持lib版本编写和测试的。


Hello I added a new dependency and I started getting the following error when I try to run the application:

Warning:Exception while processing task java.io.IOException: Can't write [/Users/paularellano/Documents/Workbench/Android/Huddle/huddle_2.0 updt/Huddle_Android/build/intermediates/transforms/proguard/release/jars/3/1f/main.jar] (Can't read [/Users/paularellano/.android/build-cache/d4e5659d4f4fc411f22ba3f779b09d40beccc03f/output/jars/libs/internal_impl-23.0.1.jar(;;;;;;**.class)] (Duplicate zip entry [internal_impl-23.0.1.jar:android/support/v4/view/WindowInsetsCompat.class]))

I tried adding an exclude but I am not sure what I should exclude to remove this duplicate jars, any help would be appreciated it! Thank you in advance!

GRADLE:

compileSdkVersion 23
buildToolsVersion '25.0.2'

dependencies {
    compile ('com.google.android.gms:play-services-location:6.5.87') {
        exclude module: 'support-v4'
    }
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:support-v4:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.google.maps.android:android-maps-utils:0.4'
    compile 'info.hoang8f:android-segmented:1.0.6'

    //expandable recycler view **RECENTLY ADDDED AND GIVES ERROR**
    compile 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'

    //Testing
    testCompile 'junit:junit:4.12'
    testCompile 'org.robolectric:robolectric:3.1.4'

}

I also added this line on pro guard just incase but no luck:

-dontwarn com.bignerdranch.**

解决方案

com.bignerdranch.android:expandablerecyclerview library uses support library version 24.2.1, whereas you also imported support lib version 23.0.1.

Either upgrade your support libs version to 24.2.1 or exclude support lib dependency from expandablerecyclerview library.

compile('com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1') {
    exclude group: 'com.android.support', module: 'support-v4'
}

Note, this may break expandablerecyclerview library, because it was written and tested with a newer support lib version.

这篇关于处理任务java.io.ioexception时出现异常:无法写入或读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆