Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.0.0) in ionic3?

本秂侑毒 提交于 2019-12-05 01:48:49

This solution worked for me

1- In the CordovaLib folder and in the build.gradle file, change the position of the Maven up

Repositories {
   maven {
         url "https://maven.google.com"
   }
   jcenter()
}

2- In the general build.gradle file of the project change the position of Maven up and add google()

Repositories {
   maven {
         url "https://maven.google.com"
   }
   google()
   jcenter()
}

3- In the build.gradle file of the APP folder change the position of Maven up and add google()

buildscript {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        google()
        mavenCentral()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
    }
}

// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
    repositories {
        google()
        mavenCentral();
        jcenter()
    }
}

4 - Finally, run the "Make Project" that is in the upper corner of Android Studio.

I did the following :

ionic cordova platform remove android ionic cordova platform add android ionic build android

And it worked!

Thanks! Had the same issue with cordova project build--setting maven repository as the first entry in both \platforms\android\build.gradle and \platforms\build.gradle files.

I changed the com.android.tools.build:gradle:3.2.1 in Top-level build file to the android studio itself version and it worked.

you can find the current studio version in Help - About.

  1. npm update -g ionic (update ionic CLI)

  2. npm update -g cordova (update cordova CLI)

  3. ionic cordova platform rm android (Remove Platform)

  4. npm uninstall(remove Node module)

  5. npm install(add Node module)

  6. ionic cordova platform add android (add platform)

Then build command run:

ionic cordova build android If you want to run app in simulator then run Ionic cordova run android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!