APK is signed with Signature Scheme V2, which is not yet supported. Please disable signing with Sche

how can i fix that?


BTW i am using gradle.
when i switch to ant there is a build error because occulus lib is not included on gameactivity.java

That’s a real disappointment Oculus does not seem to support gradle yet :frowning: Best to ask them in their forum I guess? : https://forums.oculus.com/developer/categories/unreal

I am able to build with ant without any problems. What version are you using? I’m on: /NVPACK/apache-ant-1.8.2

PS: Are you using 3D widgets in your project? Do you notice this big problem in 4.17: [GearVR] 3D widget performance degregation in 4.17 - XR Development - Unreal Engine Forums

Yes i am using 3d widgets and same ant version

In gradle you have to set Signature Scheme V2=false.
Now the question is how to do it with ue4

How does one switch between Ant and Gradle in 4.17 ?

project settings,on search write “gradle”

Looks like easiest is adding “v2SigningEnabled false” to the buildAdditions.gradle generated by UEDeployAndroid.cs in the Intermediate/Android/APK/gradle/app:

android {
  signingConfigs {
    release {
      storeFile file('path to .keystore'
      storePassword 'storepassword'
      keyAlias 'alias'
      keyPassword 'password'
      v2SigningEnabled false

then just run the rungradle.bat :app:assembleRelease from Intermediate/Android/APK/gradle to rebuild the APK (delete the APK in Binaries/Android first).

You could also add this in UEDeployAndroid.cs:

		GradleBuildAdditionsContent.AppendLine(string.Format("			keyPassword '{0}'", KeyPassword));

		ConfigHierarchy Ini = GetConfigCacheIni(ConfigHierarchyType.Engine);
		bool bPackageForGearVR;
		Ini.GetBool("/Script/AndroidRuntimeSettings.AndroidRuntimeSettings", "bPackageForGearVR", out bPackageForGearVR);
		if (bPackageForGearVR)
			GradleBuildAdditionsContent.AppendLine("			v2SigningEnabled false");

		GradleBuildAdditionsContent.AppendLine("		}");

This would make it so GearVR enabled apps for distribution disable the new signing.

Note: it may also be necessary to add “v1SigningEnabled true”, but I’m not 100% certain.

we are going to test it asap!

now i am getting this

when i build with ant shos this error too

I can’t reproduce it; I tried a Gear VR for distribution build and it compiled fine with both Ant and Gradle. Maybe try clearing the Intermediate/Android/APK and packaging again.

I have tested the above fix and submitted it to 4.17.2 hotfix: https://github.com/EpicGames/UnrealEngine/commit/3599a45b7f4822d108afd49f3ebb377022dbdd46

You can verify it works by running apksigner.bat (from android-sdk-windows/build-tools/[version]): “apksigner.bat verify -v GearVRTest-Android-Shipping-armv-es2.apk”. You should see:

Verified using v1 scheme (JAR signing): true
Verified using v2 scheme (APK Signature Scheme v2): false
Number of signers: 1

the error is because this

with the github hotfix+ the gameactivity error fix now i can upload the apk to oculus store.

I still had to edit xml file in 4.16 to get it to build. So the issue has not been fixed in 4.17 either?

well in 4.17 there is no GearVR_APL.xml son what i did was remove the file from the Intermediate folder and then force the rebuilds with the method of [MENTION=11153]Chris Babcock[/MENTION]

I’m checking the Oculus, but I believe at some point they removed the call and forgot to update the GearVR_APL.xml file.

APK Already Exists An APK with this package name and version code already exists. Please increment the version code and then resubmit your update.

CHanging the value on Platforms_Android -> ApkPacking has no effect thus manifest always write Version and Code 1

If you run “aapt.exe d badging my.apk” it will show the version code; but you can also check the AndroidManifest.xml. I’ve checked and it does get set properly. Is your DefaultEngine.ini maybe read-only?

The only other way I see for the store version to be wrong is if you turned on bUseChangeListAsStoreVersion in the ini and have environment variable IsBuildMachine=1.

it shows version 3 but when i upload to oculus store it says version1 name 1. weird