美文网首页
Android打包时提示某些API代码已过时

Android打包时提示某些API代码已过时

作者: bingling0420 | 来源:发表于2020-01-15 10:43 被阅读0次

    解决办法:

    在app/build.gradle添加:

    android {

        ...

        defaultConfig {

            ...

            multiDexEnabled true

        }

    }

    在root/build.gradle修改:

    buildscript {

    ...

    }

    allprojects {

    ...

        gradle.projectsEvaluated {

            tasks.withType(JavaCompile) {

                options.encoding = 'UTF-8'

                options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"

            }

        }

    }

    然后会提示哪些代码已过时,可以有针对性到修改

    相关文章

      网友评论

          本文标题:Android打包时提示某些API代码已过时

          本文链接:https://www.haomeiwen.com/subject/tvxtzctx.html