Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Android build error

Discussion in 'Android' started by yanflex, Jul 26, 2018.

  1. yanflex

    yanflex

    Joined:
    Mar 1, 2018
    Posts:
    8
    I am getting the following error. How to find out what caused the duplicated definition? Thanks!

    CommandInvokationFailure: Gradle build failed.
    /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.0.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"

    stderr[
    /Users/sdfklasfjsa/projects/game2/unity/Temp/gradleOut/build/intermediates/res/merged/release/values/values.xml:244: AAPT: Attribute "actionBarSize" already defined with incompatible format.

    /Users/sdfklasfjsa/projects/game2/unity/Temp/gradleOut/build/intermediates/res/merged/release/values/values.xml:148: AAPT: Original attribute defined here.

    /Users/sdfklasfjsa/projects/game2/unity/Temp/gradleOut/build/intermediates/res/merged/release/values/values.xml:244: error: Attribute "actionBarSize" already defined with incompatible format.
    /Users/sdfklasfjsa/projects/game2/unity/Temp/gradleOut/build/intermediates/res/merged/release/values/values.xml:148: Original attribute defined here.
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,442
    You have the same plugin included more than once.

    I believe that this resource is part of the "Android support library". Look for files that contain "support" in their name and see if you spot any duplicates.

    If you are unable to resolve on your own, feel free to contact me via the link in my signature below.
     
  3. zoev_1811

    zoev_1811

    Joined:
    Oct 21, 2019
    Posts:
    1
    Hello, i hope you can also help me, i have the same error here :


    C:\Users\aspcoreangular\Source\Repos\7678_Hybrid5\platforms\android\build\intermediates\res\merged\debug\values\values.xml:371: AAPT: Attribute "actionBarSize" already defined with incompatible format.
    C:\Users\aspcoreangular\Source\Repos\7678_Hybrid5\platforms\android\build\intermediates\res\merged\debug\values\values.xml:172: AAPT: Original attribute defined here.
    C:\Users\aspcoreangular\Source\Repos\7678_Hybrid5\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:83: AAPT: No resource identifier found for attribute 'appComponentFactory' in package 'android'

    This occur when i upgraded some plugins to android X,

    this was my old dependencies:
    compile 'com.android.volley:volley:1.1.0'
    compile 'com.squareup:eek:tto:1.3.8'
    compile 'com.android.support:appcompat-v7:23.2.+'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:animated-vector-drawable:27.1.0'

    Now:

    compile 'androidx.legacy:legacy-support-v4:1.0.0'
    compile 'androidx.appcompat:appcompat:1.0.2'
    // Required for GPS on newer Android devices
    compile 'com.google.android.gms:play-services-location:17.0.0'
    // Preference support library is used for the settings screen in the Samples app
    compile 'androidx.preference:preference:1.0.0'
    compile 'androidx.multidex:multidex:2.0.0'
    compile 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
    // Required 3rd-party libraries
    compile 'com.android.volley:volley:1.1.1'
    compile 'com.squareup:eek:tto:1.3.8'
     
unityunity