Search Unity

Bug in UCB with signing gradle project

Discussion in 'Unity Build Automation' started by Mishganches, Jul 25, 2017.

  1. Mishganches

    Mishganches

    Joined:
    Mar 23, 2014
    Posts:
    31
    Hey all!

    I don't know if it is the right place for posting a bug report, sorry in advance.

    We found a bug linked with building signed project with gradle in UCB or Unity Editor for Android platform.

    Problem: we need to make a build in gradle with min API Level 19.
    It required to be signed with SHA256withRSA for minimum API 18 (Android 4.3)

    I added line minSdkVersion 19 to defaultConfig in mainTemplate.gradle

    If I export project and make a build with Android Studio, build has been installed successfully
    (because Android Studio automatically setup correct version of algorithm for signing in depence on minTargetVersion).

    If i will make a build with Unity Editor, build installation fails on device with Android 4.4.2.

    The one difference is that inside Android Studio we set gradle version to 2.2.0 (Unity Editor and UCB support only v2.1.0 )

    More info about signing APK and requirements for could be found here:
    https://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html
    https://stackoverflow.com/questions/42477546/can-i-specify-digest-algorithm-apksigner-uses

    I am looking forward for the answer from UCB team and hope it will be useful.

    Unity: 5.6.2
    Platform: Android
    Min API Level: 19
    Build system: Gradle 2.1.0 and Gradle 2.2.0