• Android studio 升级常见报错


    一、Cause: duplicate entry: META-INF/MANIFEST.MF

     

    1. 1、解决方案
    2. 在android studio编译ijkplayer时出现该问题:
    3. Cause: duplicate entry: META-INF/MANIFEST.MF
    4. 一般为 工程目录build:gradle文件
    5. classpath 'com.android.tools.build:gradle:3.5.3'版本的原因。
    6. 可以把build:gradle的版本进行调整,网上有把3.5.2调成3.5.3的,偶把3.5.2调成3.4.2,结果成功编译运行。

    二、

    Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveEAndroid编译异常: duplicate entry: META-INF/MANIFEST.MF`或Entry name 'META-INF/MANIFEST.MF' collided

    解决办法

    1.新版本AndroidStudio解决办法:(该方法不行就使用下面的旧版本方法试试)

    注意:修改的是 项目的根目录下的settings.gradle文件内容

    1. pluginManagement {
    2. repositories {
    3. gradlePluginPortal()
    4. google()
    5. mavenCentral()
    6. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
    7. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
    8. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
    9. maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
    10. maven { url "https://jitpack.io" }
    11. }
    12. }
    13. dependencyResolutionManagement {
    14. repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    15. repositories {
    16. google()
    17. mavenCentral()
    18. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
    19. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
    20. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
    21. maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
    22. maven { url "https://jitpack.io" }
    23. }
    24. }
    25. rootProject.name = "My Application"
    26. include ':app'

    2.旧版本AndroidStudio用下面的办法:

    注意:修改的是 项目的根目录下的build.gradle文件内容

    1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
    2. buildscript {
    3. repositories {
    4. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
    5. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
    6. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
    7. maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
    8. jcenter()
    9. maven { url "https://jitpack.io" }
    10. }
    11. }
    12. allprojects {
    13. repositories {
    14. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
    15. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
    16. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
    17. maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
    18. jcenter()
    19. maven { url "https://jitpack.io" }
    20. }
    21. }

  • 相关阅读:
    部署你的第一个应用
    如何通过算法模型进行数据预测
    vue课程79 介绍并安装vue-cli
    差模电感和共模电感的差别
    全网疯传,阿里 P8 技术官的架构笔记外泄:微服务分布式架构实践手册
    Spinnaker调用Jenkins API 返回403错误
    【node进阶】深度解析Koa框架---路由|静态资源|获取请求参数
    【老生谈算法】matlab常用算法程序合集——常用算法
    解决:黑马webpack视频中出现的问题总结
    达梦数据冲刺科创板:拟募资24亿 冯裕才曾为华科教授
  • 原文地址:https://blog.csdn.net/shi450561200/article/details/133141728