question

Dan avatar image
Dan asked rostyslav commented

Cannot upload production apks built in Android Studio 2.2

As Android Studio 2.2 went live yesterday in the stable channel, I updated and have since learnt that the market is no longer accepting apks built by it. Error reads:

Error The APK must be signed with jarsigner

Is there a fix for this that doesn't involve downgrading Android Studio? Thanks

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kamlakar avatar image kamlakar commented ·

I am also facing same problem

0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega commented ·

@Rostyslav please post this as an answer not a comment, this is definitely the solution. Thanks for posting!

0 Likes 0 ·
rostyslav avatar image
rostyslav answered rostyslav commented

I had the same issue with 'com.android.tools.build:gradle:2.2.0' build tool version. With 'com.android.tools.build:gradle:2.1.3' works fine. It doesn`t depend on Android Studio version.

4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

james-cha avatar image james-cha commented ·

Hey Rostyslav,

Did you make the changes your build.gradle for your project?

dependencies {
        classpath 'com.android.tools.build:gradle:2.1.3'
}
0 Likes 0 ·
Dan avatar image Dan commented ·

I'm confused as to why the gradle version matters for our apks. Is this going to be an ongoing concern with subsequent versions? This should definitely be documented somewhere.

0 Likes 0 ·
rostyslav avatar image rostyslav commented ·

Wingnut , not gradle version, but version of the library(Android Plugin for Gradle) that is used in build process of Android applications and libraries. I am guessing there are some difference in structure of built apks that Clover market checker doesn`t know.

0 Likes 0 ·
Dan avatar image Dan commented ·

Yes sorry. It's quite annoying though because a) we can't use the latest version, and b) we won't ever know when or if we can upgrade

0 Likes 0 ·
gleebuyfi avatar image
gleebuyfi answered

I wrote a really long answer to this on my blog but basically the problem is that the zip file structure has changed compression type and Clover will not accept upload using the new zip compression type.

But you can unzip and rezip with no compression and upload successfully. Try doing the following:

(btw.. change to release if you are upload release versions instead of debug versions)

unzip app-xxxxx-debug.apk -d app-xxxxx-debug
cd app-xxxxx-debug
zip -r -0 ../app-xxxxx-debug-rezipped.apk *

Basically you can unzip and rezip without compression and it will upload from the Android Studio 2.2 RC2+ without issue.

I haven't tried the buildtools change but it probably reverts to previous version of the zipper and that should work also.

Way too much detail at: http://blog.repasta.com/2016/09/andro...

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community