Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Plugins] Andoid Build problem

Discussion in 'Android' started by zotakomen, Feb 17, 2019.

  1. zotakomen

    zotakomen

    Joined:
    Sep 5, 2015
    Posts:
    2
    Hello

    I have two plugins to implement in my game AdColony and GameAnalitycs. They both working fine separately, but when they are both imported it couses build error: CommandInvokationFailure: Failed to re-package resources.
    Both packages has same folder iwth files
    PlayServicesResolver (adColony)
    - Google.IOSResolver,dll
    - Google.JarResolver.dll
    - Google.VersionHandler.dll
    - Google.VersionHandlerImpl.dll
    - play-services-resolver.txt

    PlayServicesResolver (gameAnalitycs)
    - Google.IOSResolver_v1.2.89.0,dll
    - Google.JarResolver_v1.2.89.0.dll
    - Google.VersionHandler.dll
    - Google.VersionHandlerImpl_v1.2.89.0.dll
    - play-services-resolver_v1.2.89.0.txt

    When both plugins imported I am getting an error:

    Code (CSharp):
    1. error CS1704: An assembly with the same name `Google.JarResolver' has already been imported. Consider removing one of the references or sign the assembly
    2. Assets/PlayServicesResolver/Editor/Google.JarResolver_v1.2.89.0.dll (Location of the symbol related to previous error)
    3. Assets/PlayServicesResolver/Editor/Google.JarResolver.dll (Location of the symbol related to previous error)
    4. error CS1704: An assembly with the same name `Google.IOSResolver' has already been imported. Consider removing one of the references or sign the assembly
    5. Assets/PlayServicesResolver/Editor/Google.IOSResolver_v1.2.89.0.dll (Location of the symbol related to previous error)
    6. Assets/PlayServicesResolver/Editor/Google.IOSResolver.dll (Location of the symbol related to previous error)
    7. error CS1704: An assembly with the same name `Google.VersionHandlerImpl' has already been imported. Consider removing one of the references or sign the assembly
    8. Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl_v1.2.89.0.dll (Location of the symbol related to previous error)
    9. Assets/PlayServicesResolver/Editor/Google.VersionHandlerImpl.dll (Location of the symbol related to previous error)
    10.  
    11. Compilation failed: 3 error(s), 0 warnings

    After removing "dublicates" i am getting an build error:


    Code (CSharp):
    1. CommandInvokationFailure: Failed to re-package resources.
    2. D:\Android SDK\build-tools\28.0.3\aapt.exe package --auto-add-overlay
    3.  
    4. -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "D:/Android SDK\platforms\android-28\android.jar" -F bin/resources.ap_
    5.  
    6. --extra-packages
    7.  
    8. com.adcolony.unitypluginpackage:com.unity.purchasing:com.gameanalytics.sdk.android:com.android.vending.billing:com.unity.purchas
    9.  
    10. ing.googleplay:com.yandex.metrica:com.unity3d.ads -S "D:\repository\Labyrinth\Labyrinth\Temp\StagingArea\android-libraries
    11.  
    12. \common\res" -S "D:\repository\Labyrinth\Labyrinth\Temp\StagingArea\android-libraries\gameanalytics\res" -S "D:\repository
    13.  
    14. \Labyrinth\Labyrinth\Temp\StagingArea\android-libraries\GoogleAIDL\res" -S "D:\repository\Labyrinth\Labyrinth\Temp\StagingArea
    15.  
    16. \android-libraries\GooglePlay\res" -S "D:\repository\Labyrinth\Labyrinth\Temp\StagingArea\android-libraries\unity-ads\res"
    17.  
    18. stderr[
    19. AndroidManifest.xml:16: error: Error: No resource found that matches the given name (at 'value' with value
    20.  
    21. '[USER=549918]@Integer[/USER]/google_play_services_version').
    22.  
    23. ]
    24. stdout[
    25. Configurations:
    26. (default)
    27.  
    28. Files:
    29.   AndroidManifest.xml
    30.     Src: ()
    31.  
    32. AndroidManifest.xml
    33.  
    34. Resource Dirs:
    35. Including resources from package: D:\Android SDK\platforms\android-28\android.jar
    36. applyFileOverlay for drawable
    37. trying overlaySet Key=app_banner.png
    38. applyFileOverlay for layout
    39. applyFileOverlay for anim
    40. applyFileOverlay for animator
    41. applyFileOverlay for interpolator
    42. applyFileOverlay for transition
    43. applyFileOverlay for xml
    44. applyFileOverlay for raw
    45. applyFileOverlay for color
    46. applyFileOverlay for menu
    47. applyFileOverlay for font
    48. applyFileOverlay for mipmap
    49. trying overlaySet Key=app_icon.png
    50. trying overlaySet Key=app_icon.xml
    51. trying overlaySet Key=app_icon_round.xml
    52. trying overlaySet
    53.  
    54. Key=ic_launcher_background.png
    55. trying overlaySet Key=ic_launcher_foreground.png
    56. Processing image: res\drawable-xhdpi
    57.  
    58. \app_banner.png
    59.     (processed image res\drawable-xhdpi\app_banner.png: 88% size of source)
    60.     (new resource id app_banner from
    61.  
    62. xhdpi-v4\drawable\app_banner.png #generated)
    63. Processing image: res\mipmap-mdpi\app_icon.png
    64. Processing image: res\mipmap-mdpi
    65.  
    66. \ic_launcher_background.png
    67.     (processed image res\mipmap-mdpi\ic_launcher_background.png: 31% size of source)
    68. Processing image:
    69.  
    70. res\mipmap-mdpi\ic_launcher_foreground.png
    71.     (processed image res\mipmap-mdpi\app_icon.png: 36% size of source)
    72.     (processed
    73.  
    74. image res\mipmap-mdpi\ic_launcher_foreground.png: 83% size of source)
    75.     (new resource id app_icon from mdpi-v4\mipmap
    76.  
    77. \app_icon.png #generated)
    78.     (new resource id app_icon from res\mipmap-anydpi-v26\app_icon.xml)
    79.     (new resource id
    80.  
    81. app_icon_round from res\mipmap-anydpi-v26\app_icon_round.xml)
    82.     (new resource id ic_launcher_background from mdpi-v4\mipmap
    83.  
    84. \ic_launcher_background.png #generated)
    85.     (new resource id ic_launcher_foreground from mdpi-v4\mipmap
    86.  
    87. \ic_launcher_foreground.png #generated)
    88. ]
    89. exit code: 1
    90. UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program
    91.  
    92. p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    93. UnityEditor.Android.Command.Run
    94.  
    95. (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String
    96.  
    97. errorMsg)
    98. UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String
    99.  
    100. workingdir, System.String errorMsg)
    101. UnityEditor.Android.PostProcessor.Tasks.BuildResources.CompileResources
    102.  
    103. (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    104. UnityEditor.Android.PostProcessor.Tasks.BuildResources.Execute
    105.  
    106. (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    107. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks
    108.  
    109. (UnityEditor.Android.PostProcessor.PostProcessorContext context)
    110. UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    I have no idea what to do with it.
     
    Last edited: Feb 17, 2019
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    were you able to fix this?

    the resolver plugin should automatically resolve dependencies (google play services libraries) for you.
    can you check if you have those in your project? (should be a few files under Assets/Plugins/Android named something like play-services-xxxx.aar)
     
  3. diliupg

    diliupg

    Joined:
    Jan 23, 2018
    Posts:
    45
    There are certain problems with Unity that even those who built the software cannot answer. That is my conclusion after several years of asking questions and searching the internet for answers.
     
  4. xpxilom

    xpxilom

    Joined:
    Aug 28, 2014
    Posts:
    30
    were you able to fix this?
     
  5. ManieBesselaar

    ManieBesselaar

    Joined:
    Nov 1, 2018
    Posts:
    29
    Not sure if this will help anyone but I had a similar problem with android resolver. Happened on a fresh install of Unity ( new computer) with an existing project that was fine before. I realized that my build settings were set to windows.
    Switched to android and the error disappeared.
    Hope this helps someone.