最近一周工作遇到的问题(5.20)

1.关于引入第三方libs,导致项目中使用的libs版本不一致,例如support包,第三方使用的版本是25.1.2,而你自己的项目中使用是27,你无法对第三方项目中代码做修改,导致你build项目的时候报重复引入包的错误,可以在build.gradle使用下面一句话统一版本:

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '27.1.0'//此处为你需要的版本
            }
        }
    }
}

重新build 发现jar包完全统一了。

2. 关于UI全屏和system Bar 的处理,隐藏或者透明等,官网作出了介绍,链接如下:

  https://developer.android.com/training/system-ui/ ,详细介绍了相关操作

3. android jetpack 

 Jetpack is a set of libraries, tools and architectural guidance to help make it quick and easy to build great Android apps. It provides common infrastructure code so you can focus on what makes your app unique.

  在2018开发者大会里详细介绍这块,官网https://developer.android.com/jetpack/,我个人比较关注

    Architecture Components,这块的更新。

同时可以关注一下YouTube上相关的Google官网视频,以及博客。

4. Android Profiler 比之前的monitor好用很多。

  不过需要开启:run -edit configuration -profiling Enable advanced .调试完成后关闭,就可以查看cpu ,memory,network,以及其详细信息 ,官网介绍

https://developer.android.com/studio/profile/android-profiler

最近一周工作遇到的问题(5.20)_第1张图片

5.ConstraintLayout

   很久没有用他了,这次做界面,全部用它来做发现真的很好用,铺页面很快。

你可能感兴趣的:(android)