More than one file was found with OS independent path 'META-INF/rxjava.properties

2019-04-22 13:48:05

  之前落下了android新出的很多常用的类库(ok3,rxjava,retrofit)今天刚好有时间,就一个一个学习下,虽然源码看着后面,忘着前面,不过现在好在都会用了噻

添加需要的类库

 compile 'com.squareup.retrofit2:retrofit:2.0.2'

    compile 'com.squareup.retrofit2:converter-gson:2.0.2'

    compile 'com.squareup.okhttp3:okhttp:3.1.2'

    compile 'com.squareup.okio:okio:1.7.0'

    compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'

   compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'

在retrofit结合rxjava2的过程中,遇到了一个问题,

特记录一下:

More than one file was found with OS independent path 'META-INF/rxjava.properties

解决方式如下:

在app下的build.gradle里面的defaultConfig里面添加:

 defaultConfig {

       packagingOptions {

            exclude 'META-INF/rxjava.properties'

        }

    }


  • 2023-09-21 16:49:06

    用webpack.ProvidePlugin来解决Photo-Sphere-Viewer旧版本浏览器兼容问题

    上篇文章已经搭建了最基本的项目,我用手机下载了一个版本62.点开头的chrome apk来测试。 果真白屏,啥也没有,也看不到报错信息。 赶紧安装 vconsole ,重启,刷新,依然白屏,连vconsole也没有。这可咋弄。 想了下,这浏览器老的是可以呀,还得修改编译参数,加大es5的处理。 根目录有一个配置文件 .browserslistrc 里面的配置如下