Avatar SDK Unity Cloud plugin  3.0.1
Realistic avatar generation toolset for Unity3D
How To Resolve Android Plugins Conflicts

For taking photo on android and loading pictures from the internal storage we have developed a special plugin: Assets/itseez3d/avatar_sdk/sdk_core/Plugins/Android/com.itseez3d.androidplugins.aar. This *.aar depends on the androidx.core.core-1.0.0.aar that is provided with the Avatar SDK plugin. If your project or some 3rd party assets have conflicts with this support library, you should delete it from the project and follow one of solutions below.

Use Custom Gradle Template

  1. Open Player Settings and navigate to the Publishing Settings section. Enable checkbox next to Custom Gradle Template. This will generate a mainTemplate.gradle file in the Assets/Plugins/Android directory.
    custom_gradle_template.jpg
  2. Add support dependency to the created gradle file: implementation 'androidx.legacy:legacy-support-v4:1.0.0'. The final gradle template file should look like:
    // GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
    apply plugin: 'com.android.library'
    **APPLY_PLUGINS**
    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    **DEPS**}
    android {
    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'
    compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
    }
    defaultConfig {
    minSdkVersion **MINSDKVERSION**
    targetSdkVersion **TARGETSDKVERSION**
    ndk {
    abiFilters **ABIFILTERS**
    }
    versionCode **VERSIONCODE**
    versionName '**VERSIONNAME**'
    consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
    }
    lintOptions {
    abortOnError false
    }
    aaptOptions {
    ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**PACKAGING_OPTIONS**
    }**REPOSITORIES****SOURCE_BUILD_SETUP**
    **EXTERNAL_SOURCES**
  3. Build and run the project.

Use External Dependency Manager For Unity (EDM4U)

The EDM4U downloads and integrates Android library dependencies and handle any conflicts between plugins that share the same dependencies. See more information about this plugin: https://github.com/googlesamples/unity-jar-resolver

  1. Download the latest Dependency Manager and import it into your project.
  2. Create an Editor directory somewhere in your project and add the AvatarSDKDependencies.xml file into it with the following content:
    <dependencies>
    <androidPackages>
    <androidPackage spec="androidx.legacy:legacy-support-v4:1.0.0">
    <androidSdkPackageIds>
    <androidSdkPackageId>extra-google-m2repository</androidSdkPackageId>
    </androidSdkPackageIds>
    </androidPackage>
    </androidPackages>
    </dependencies>
  3. Press Assets -> External Dependency Manager -> Android Resolver -> Force Resolve
    android_resolver_force.jpg
  4. Build and run the project.