美文网首页
Android 报错汇总

Android 报错汇总

作者: 得食猫 | 来源:发表于2019-07-13 11:47 被阅读0次

1.安装时提示“应用组件的命名与已安装应用有冲突”

出现这个问题是用于同一套代码打了两个applicationId的包,而手机上已经安装了其中一个,安装另外一个时就会报错。其原因是Manifast中配置的ContentProvider中的authorities没有更改,致使两个不同applicationId的authorities相同

2.Error while generating the main dex list

打包时报了这个错,详细报错情况如下:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForRelease'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

具体是哪个包冲突了可以再RunTask中找到

3.More than one file was found with OS independent path

在出错的Model的gradle的android节点下添加

packagingOptions {
        pickFirst 'META-INF/*'
    }

相关文章

网友评论

      本文标题:Android 报错汇总

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