Reproduction steps:
- Open the attached project "BuildJenkins.zip"
- Go to Player Settings, and under the Publishing Settings add:
- Keystore pass: 123456
- Alias name: user
- Alias pass: 123456
3. Under the Other Settings in Player Settings make sure that the Minimum API Level is set to API level 24 or higher
4. Open Build Settings, select the Android platform, and build
5. Check the built apk, with the following cmd:
- jarsigner -verify -certs TestAndroid.apk
Expected result: Apk is signed
Actual result: Apk is unsigned
Reproducible with: 2020.3.39f1, 2021.3.9f1, 2022.1.16f1, 2022.2.0b7, 2023.1.0a9
Reproduced on: Windows 10 Pro 21H2
Notes:
- Optionally you can use this cmd command to check the apk's signature: keytool -list -printcert -jarfile TestAndroid.apk
- APK not signed if PlayerSettings.Android.minSdkVersion ("Minimum API Level" value in Unity editor's Player Settings) is set to 24 or a higher value
- The same issue is described here: https://forum.unity.com/threads/unity-2020-1-10-does-not-seem-to-sign-the-apk-file.992461/
- Refer to "SignatureEnabler.cs" for possible fix or an overcome