Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.1.2) error after gradle 4.4 upgrade

After updrading to gradle 4.4:

gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 

Android project compilation fails with the following error:

Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.1.2). Searched in the following locations:     https://jcenter.bintray.com/com/android/tools/build/manifest-merger/26.1.2/manifest-merger-26.1.2.jar 
like image 834
Jérémy Reynaud Avatar asked May 28 '18 10:05

Jérémy Reynaud


2 Answers

The solution is quite simple, you have to invert jcenter() and google() repositories in your root build.gradle file (in mine jcenter() was first):

buildscript {      repositories {         google()         jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:3.1.2'           // NOTE: Do not place your application dependencies here; they belong         // in the individual module build.gradle files     } }  allprojects {     repositories {         google()         jcenter()     } } 
like image 86
Jérémy Reynaud Avatar answered Oct 04 '22 13:10

Jérémy Reynaud


I solved this by upgrading gradle wrapper version to gradle-4.10.1-all.zip

gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip 
like image 23
Shayan_Aryan Avatar answered Oct 04 '22 14:10

Shayan_Aryan