- 1、解决方案
- 在android studio编译ijkplayer时出现该问题:
- Cause: duplicate entry: META-INF/MANIFEST.MF
-
- 一般为 工程目录build:gradle文件
- classpath 'com.android.tools.build:gradle:3.5.3'版本的原因。
- 可以把build:gradle的版本进行调整,网上有把3.5.2调成3.5.3的,偶把3.5.2调成3.4.2,结果成功编译运行。
二、
- pluginManagement {
- repositories {
- gradlePluginPortal()
- google()
- mavenCentral()
- maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
- maven { url "https://jitpack.io" }
- }
- }
- dependencyResolutionManagement {
- repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
- repositories {
- google()
- mavenCentral()
- maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
- maven { url "https://jitpack.io" }
- }
- }
- rootProject.name = "My Application"
- include ':app'
2.旧版本AndroidStudio用下面的办法:
- // Top-level build file where you can add configuration options common to all sub-projects/modules.
- buildscript {
- repositories {
- maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
- jcenter()
- maven { url "https://jitpack.io" }
- }
- }
-
- allprojects {
- repositories {
- maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
- maven { url 'https://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
- jcenter()
- maven { url "https://jitpack.io" }
- }
- }