I’m trying to sign my apk with the keystore file I created following the Unity instructions. But after I successfully build the apk, using jarsigner to verify it always showed signed by “Android Debug” instead of the actual Company Name.
I’m using Gradle to build the apk and with Devlopment Build option on, which builds fine but not signed properly. If I turn off the Development Build option, it shows the error of
“FileNotFoundException: Temp\gradleOut\build\outputs\apk\gradleOut-release.apk does not exist”
Can anyone let me know how I can test with the signing of apk? Thanks and I’m using Unity 5.6.3p1.
The “Android Debug” signing is the expected behavior for a development build. As for the “FileNotFoundException” - is this the whole error? If not, could you please post the full error?
I get this in the editor log just before the error, sounds like the manifest failed to merge I guess, I’ll take a look into this and report back if I find a solution.
[Temp\StagingArea\AndroidManifest-main.xml:1, C:\Users\UserName\Documents\Unity\ProjectName\Temp\StagingArea\android-libraries\AN_Res\AndroidManifest.xml:2] /manifest/supports-screens defined in library, missing from main manifest:
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
FileNotFoundException: Temp\gradleOut\build\outputs\apk\gradleOut-release.apk does not exist
So I managed to successfully build. The problem was unrelated to the manifest issue, I had set up the signing of my mainTemplate.gradle file incorrectly.
“Basically, you add a “signinConfig”, in where you specify the location an password of the keystore. Then, in the release build type, refer to that signing configuration.”
As a side note I keep my keystore in my project directory and so had to move up 2 directories from ProjectDirectory/Temp/gradleOut in order to find my keystore like so:
storeFile file(“…/…/KEYSTORE_NAME.keystore”).
Right now my game immediately crashes on device on launch with “Unfortunately, [App Name] has stopped” but that’s very likely a totally seperate issue I have to look into.
I manually changed my old unity Gradle to a higher version (gradle-5.6.2) and as a result I also was getting “FileNotFoundException: Temp\gradleOut\build\outputs\apk\gradleOut-release.apk does not exist” error on my Unity 5.6.6f2, but my APK in fact was created in “apk*release*\gradleOut-release.apk” folder, so I added this line to my mainTemplate.gradle and it worked: