Tag Archives: Package error

[Solved] Unity Package Error: FAILURE: Build failed with an exception.

Main error reports:

> Using multiple versions of the Android gradle plugin in the sample build is not allowed.
meaning: using multiple versions of the Android gradle plugin in the same version is not allowed.

positioning:
gradle version problem in
unit

Solution:
there is a gradle version file in the project
launchertemplate
maintemplate
find a code similar to the following

buildscript {
    repositories {
        mavenCentral()
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.3'
**BUILD_SCRIPT_DEPS**}

If not, add
as shown in the figure

to ensure that the version numbers (3.4.3) in the two files are consistent