Search Issue Tracker

Fixed in Unity 2017.2

Votes

37

Found in

5.6.0p3

Issue ID

907071

Regression

No

[Android] Project fails to build using the updated Android SDK Tools 26.0 during the merging manifest files

Android

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 2No workaround

Reproduction steps:
1. Update Android SDK Tools to 26.0.1 or 26.0.2;
- Android Studio -> Configure -> SDK Manager -> Android SDK -> SDK Tools
2. Create the new project;
3. Switch the platform to Android in the Build settings;
4. Enable "Virtual Reality Supported" and select VR SDKs (Oculus or Daydream) in the Player settings;
5. Build the project;

Actual result: the project does not build and the window "Build failure" shows up with an error "Unable to merge android manifests" (build_failure.jpg).
Expected result: the project should be built on Android platform.

Note: the issue happens only when Android SDK Tools is updated to 26.0, because when it is 25.2.5 version, everything works fine. Also, if "Virtual Reality Supported" is disabled, everything works correctly too.

Reproduced with: 5.4.5p2, 5.5.3p3, 5.6.0p4, 2017.1.0b4

DUT:
Samsung SM G928F*, OS:6.0.1, CPU:arm64-v8a, GPU:Mali-T760, Build:samsung/zenltexx/zenlte:6.0.1/MMB29K/G928FXXS3BPIA:user/release-keys (Reproduced)

Sony D6603 (Xperia Z3)*, OS:6.0.1, CPU:armeabi-v7a, GPU:Adreno (TM) 330, Build:Sony/D6603/D6603:6.0.1/23.5.A.1.291/2769308465:user/release-keys (Reproduced)

Samsung SM G361F*, OS:5.1.1, CPU:armeabi-v7a, GPU:Vivante GC7000UL, Build:samsung/coreprimeveltexx/coreprimevelte:5.1.1/LMY48B/G361FXXU1APB1:user/release-keys (Reproduced)

Merging for Daydram fixed in:
5.4.5p3, 5.5.3p4, 5.6.0p4, 2017.1.0b3

Fix for Oculus coming soon, this will be edited to reflect the changes.

Comments (14)

  1. 9b855e653cc2fa6fe3d99878b34c8eca?d=mm

    Samantha_Jones

    Jul 26, 2017 10:57

    The issue has been resolved, though the oculus fix isn't available and there appears to be no workaround since previous Android tools are no longer available from the website

  2. 4c1a213776a0511184b25d8aad5c4b26?d=mm

    monremobile

    Jul 13, 2017 21:31

    This works for me:

    Download BuildTools 25.0.3 and 26.0.0
    Copy and paste apksigner.bat from 25 to 26
    Copy and paste lib/apksigner.jar from 25 to 26

    ... fixed! :)

  3. 6152d475900557d66d3be6580129ad04?d=mm

    idontneedthat

    Jul 13, 2017 14:37

  4. 9ec43e75f59d6d608c922e2eb3a891f6?d=mm

    OmarAbdelhafiz

    Jul 10, 2017 17:45

    For me downgrading to revision 25.2.5 worked just fine. Once you download an older version of the tools, if you have android studio installed put these tools in a directory different from the Android SDK directory, then just install the Android SDK Tools, Android SDK Platform-tools, Android SDK Build-tools, the latest API level as described in the tutorial.

    Here are the links:

    Windows: https://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip

    Mac OSX: https://dl-ssl.google.com/android/repository/tools_r25.2.5-macosx.zip

  5. 25cb30b6854acfa45365946946aebc59?d=mm

    HamzaKhan1

    Jun 30, 2017 22:38

    @JAZZPABLO My Oculus Signature File does not work, when I build the game and insert the phone into the gearVR it says add signature file to APK

  6. 5a7eeafa818bb45068c74d8b573d69bc?d=mm

    barceloco

    Jun 28, 2017 00:25

    I've had the same problem. Thanks for reporting!

  7. 9621271bb01fb12b7c76dee486ea40c0?d=mm

    Brainversation01

    Jun 12, 2017 21:08

    @JAZZPABLO Thank you soooooo much!!!

  8. Cde0d623e66297542d89144e429171e2?d=mm

    DavidSmit

    Jun 09, 2017 15:10

    Update, this seemed to work: (I couldn't find the files there, but a quick google will get you the right file)

    1) just open https://developer.android.com/studio/index.html
    2) scroll down to the bottom of that page
    3) go to downloads
    4) scroll down to the bottom of that page
    5) find Windows "tools_r25.2.3-windows.zip" download and unzip it
    5) find MacOSX "tools_r25.2.3-macosx.zip" download and unzip it.
    6) In the SDK path replace the tools folder.

    as related in this issue thread:
    https://issuetracker.unity3d.com/issues/android-build-fails-when-the-latest-android-sdk-tools-25-dot-3-1-version-is-used

  9. Cde0d623e66297542d89144e429171e2?d=mm

    DavidSmit

    Jun 09, 2017 14:56

    Also happening on 5.6.1f1, with android SDK build tools 24.0.3 and 26.0.0
    Throws this error:
    ...\Temp\StagingArea\AndroidManifest-main.xml:7:16-49 Error:
    Attribute application@icon value=(@drawable/app_icon) from AndroidManifest-main.xml:7:16-49
    is also present at AndroidManifest.xml:13:9-45 value=(@drawable/ic_launcher).
    Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest-main.xml:7:3-47:17 to override.

  10. A2a68be80657a4c47efafadd12817d7c?d=mm

    jazzpablo

    May 27, 2017 08:40

    Workaround in the meantime (first shared here https://issuetracker.unity3d.com/issues/android-build-fails-when-the-latest-android-sdk-tools-25-dot-3-1-version-is-used)

    1) after a failed building attempt, go to the Temp/StagingArea folder in your Unity project, grab the AndroidManifest-main.xml file

    2) copy it into Assets/Plugins/Android, rename it to AndroidManifest.xml

    3) in the file itself, remove "android:theme="@style/UnityThemeSelector" and "android:debuggable="true""

    With that, at least I'm able to build for Gear VR.

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.