ERROR: APK signed using APK Signature Scheme v2 but no signature was found

1,700 views
Skip to first unread message

Henrik R.

unread,
Feb 28, 2020, 12:31:00 PM2/28/20
to Kivy users support
I finally succeeded using the Buildozer procedure "Creating a Release APK" - https://github.com/kivy/kivy/wiki/Creating-a-Release-APK - to sign my app. Then I tried uploading it to play.google.com. But I received this error:

Error from apksigner: ERROR (Jar signer CERT.RSA): JAR signature META-INF/CERT.SF indicates the APK is signed using APK Signature Scheme v2 but no such signature was found. Signature stripped?

Does this error have anything to do with the strange fact that the APK-file is 155 MB?
My Python/Kivy code is only about 56 KB (including comments and such).

And it uses these modules:

import kivy
kivy.require('1.11.1')
# Developed in Python 3.6

from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.tabbedpanel import TabbedPanel
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout

from kivy.uix.floatlayout import FloatLayout
import kivy.metrics

from kivy.properties import *
from kivy.event import EventDispatcher
from kivy.uix.widget import Widget
from kivy.graphics import *

import time
import os
import json
import random
import math

Any help would be appreciated. Thank you!

Robert Flatt

unread,
Feb 28, 2020, 7:02:56 PM2/28/20
to Kivy users support
Not clear that these two issues are related.

1) apk size will usually be in the 11MB to 15MB range, unless there are extra data files (.jpg etc) .  Clearly there is an extra 135MB of something, intended or not.
Look inside the apk to see what is additional to your needs. To unpack the apk:  https://python-for-android.readthedocs.io/en/latest/troubleshooting/   see "Unpacking an APK"
Look for the extra size. If some file type in there surprises you, then read about Buildozer's options that specify exclusions.

2)  Googling    
APK is signed using APK Signature Scheme v2 but no such signature was found. Signature stripped?
Gives several hits, in those cases it is due to aligning after signing. Signing must be the last step. Was this the case?

Henrik R.

unread,
Feb 29, 2020, 5:32:14 AM2/29/20
to Kivy users support
About 2):

Yes! The Buildozer guide "Creating a Release APK" - https://github.com/kivy/kivy/wiki/Creating-a-Release-APK - about how to sign an app - does the 'zipalign' AFTER 'buildozer android release' - which does the signing!
That's not the first error I have found in that guide.
Am I the first guy ever who tries to upload a Python/Kivy app build with Buildozer to the Google Play Android app store? I am really baffled.

About 1):

Thank you very much! I will look into that!

Henrik R.

unread,
Feb 29, 2020, 7:19:14 AM2/29/20
to Kivy users support
Update:

About 1):

Yes! There is a 151 MB "private.mp3" file in the APK-file. But I haven't got the slightest idea how it got there. The only other place (in my entire file system) that file can be found is in the '.buildozer' folder under my project folder. And I deleted that entirely a few days ago. It is as if buildozer generates it 'out of nowhere'...
I have tried searching for all mp3 files larger than 140.000.000 bytes across the entire file system. There is nothing similar. And "private.mp3" doesn't even seem to contain valid sound. Audacity (advanced sound editing software) just plays gibberish for 6 seconds...! What is going on?

About 2)

Any help is most wanted.

Michael Kramer

unread,
Feb 29, 2020, 8:40:27 AM2/29/20
to Kivy users support
for point 1) - the private.mp3 file is just a .tgz file that contains all of the python files. (you can find a bit more information here: https://kivy.org/doc/stable/guide/licensing.html )

if you just rename it and decompress it you will see what is in there.

It is included as an mp3 into the project to make the android build happy so it sees it as a standard resource it should include - and then internally when the app starts (the first time) this file is decompressed within the app bundle.



--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5e7b48f9-22d2-4507-b14e-6ef2f9ed0517%40googlegroups.com.

Henrik R.

unread,
Feb 29, 2020, 10:04:50 AM2/29/20
to Kivy users support
OK. Thank you! That's a bit cryptic. :-)
The file contains a 314 MB 'venv' (Python virtual environment I presume).
How has that gotten so big? Is it a copy of my whole Python system? Is there some fast way of 'resetting' it so only the necessary modules are included?
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.

Robert Flatt

unread,
Feb 29, 2020, 12:25:03 PM2/29/20
to Kivy users support
'venv' is probably a copy of a folder in your project directory 
There may be about 20MB of something else extraneous in the project directory too.

Am I the first guy ever who tries to upload a Python/Kivy app build with Buildozer to the Google Play Android app store? I am really baffled.
Probably just the first guy to read the instructions ;)  
The signing process seems to have been added to Buildozer recently (I don't know when), it used to be separate and that worked (search old posts here).
Clearly the instructions for the newer flow are incorrect. But the only way to know would be experience.

chavarinbonbyn

unread,
Feb 29, 2020, 3:33:34 PM2/29/20
to Kivy users support
Maybe I'm the second guy to read the instructions. They are very wrong. If I sing the apk and install it to my phone it works. If then I zipalign it (as the instructions state) then when I try to install it to my phone an error appears: "The package appears to be corrupt"
Message has been deleted

Henrik R.

unread,
Mar 2, 2020, 6:51:38 AM3/2/20
to Kivy users support
1) The huge APK-file:
I (re)moved the 'venv' folder in the project folder. I don't recall how it got there... It is not the 'venv' that my PyCharm uses.

2) The "Creating a Release APK" guide:
Yes - simply omitting 'zipalign' solves the problem. I have edited the guide accordingly. 

Reply all
Reply to author
Forward
Message has been deleted
0 new messages