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'

        }

    }


  • 2020-11-17 09:50:32

    android开发怎样让悬浮Activity只是隐藏而不销毁

    android在mainfest中给Activity添加一个属性 android:theme="@android:style/Theme.Dialog",可以使Activity悬浮在其它窗口上面,在布局中可以设置activity的大小,当点击悬浮Activity边缘以外区域时,Activity会消失,观察消失时其生命周期会发现执行了finish()方法从而执行了onDestroy方法。有时我们只是需要将Activity隐藏,并不销毁,此时可以重写finish方法,如下:

  • 2020-11-17 09:56:02

    uni-app直接用webiew打开本地js资源

    如果再结合activity不销毁,隐藏的方法,像里面传递参数,来改变页面,不销毁webview,我发现这样比原生的都要快。这样又能用于app端,又能生成小程序,何乐而不为

  • 2020-11-17 09:59:05

    在线图片取色器工具

    不知道为啥,现在idea的取色工具怎么都不好使了,给开发人员反映过,都一年了有没修复咋地。 网上搜到一个取色工具,把图片传上去,就可以点击取色。不错。

  • 2020-11-17 10:05:53

    mongoDB 修改密码

    mongodb的用户信息是存放在system.users表中的,修改密码不能直接更新表数据,这样的话,存到表里的密码是明文的,这就不对了。