Android Question Signing old EXISTING app issue

jemajuca

Member
Licensed User
Hello.

Because Google requirements I need to update an old app that only needs to change the targetSdkVersion in manifest.
I used B4A v10.00 and I think there is no need to update the program.
The private sign key is correctly configured in B4A. No errors when compile.
When triyng to upload the updated apk, it shows this error:

"You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR: MIN_SIG_SCHEME_FOR_TARGET_SDK_NOT_MET: Target SDK version 31 requires a minimum of signature scheme v2; the APK is not signed with this or a later signature scheme"

I'm afraid that any change to the signing process will cause problems with my client's updates.

Any idea how to proceed?
 

GMan

Well-Known Member
Licensed User
Longtime User
Whats written in your manifest ?
 
Upvote 0

jemajuca

Member
Licensed User
Here it is:
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136

AddManifestText(
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>
<uses-permission
  android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:largeHeap,"true")

'Añadidos en esta version 1.03 estos dos:
SetServiceAttribute(BTPair, android:foregroundServiceType, "location")
SetServiceAttribute(BTPair, android:foregroundServiceType, "connectedDevice")

AddReceiverText(BTPair,
<intent-filter>
<action android:name="android.bluetooth.device.action.PAIRING_REQUEST" />
<action android:name="android.bluetooth.device.action.BOND_BONDING" />
<action android:name="android.bluetooth.device.action.BOND_BONDED" />
<action android:name="android.bluetooth.device.action.BOND_STATE_CHANGED"/>
</intent-filter>)

AddPermission(android.permission.BLUETOOTH_ADMIN)
AddPermission(android.permission.BLUETOOTH)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)

AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.ACCESS_COARSE_LOCATION)
AddPermission(android.permission.ACCESS_FOREGROUND_LOCATION)
AddPermission(android.permission.ACCESS_COARSE_UPDATES)

'End of default text.
 
Upvote 0
Top