Phonegap/cordova Android App Signature release considerations

Source: Internet
Author: User

Today finally to release Android Hybirdapp, install the original application of the process to release the signature apk, did not expect to encounter a few problems immediately, and now put their solutions to sort it down.


Export signed APK encountered the following error, this problem is caused by multiple read InputStream, seemingly and eclise automatic compilation, the solution is to turn off the automatic compilation of related projects.

Export signed APK before you turn off the Eclipse Project-Build automatically, the first pit solution!

[2014-07-25 10:50:58-salesapp] Proguard returned with error code 1. See console[2014-07-25 10:50:58-salesapp] java.io.IOException:Can ' t read [/users/zhangxitao/work/salesapp/platforms /android/cordovalib/bin/salesapp-cordovalib.jar] (Can ' t process class [com/squareup/okhttp/internal/spdy/ Spdyconnection$builder.class] (unexpected end of ZLIB input stream)) [2014-07-25 10:50:58-salesapp] at Proguard. Inputreader.readinput (inputreader.java:232) [2014-07-25 10:50:58-salesapp] at Proguard. Inputreader.readinput (inputreader.java:202) [2014-07-25 10:50:58-salesapp] at Proguard. Inputreader.readinput (inputreader.java:180) [2014-07-25 10:50:58-salesapp] at Proguard. Inputreader.execute (inputreader.java:78) [2014-07-25 10:50:58-salesapp] at Proguard. Proguard.readinput (proguard.java:196) [2014-07-25 10:50:58-salesapp] at Proguard. Proguard.execute (proguard.java:78) [2014-07-25 10:50:58-salesapp] at Proguard. Proguard.main (proguard.java:483) [2014-07-25 10:50:58-salesapp] caused By:java.io.Ioexception:can ' t process class [Com/squareup/okhttp/internal/spdy/spdyconnection$builder.class] (Unexpected end of ZLIB input stream) [2014-07-25 10:50:58-salesapp] at Proguard.io.ClassReader.read (classreader.java:112) [2014-07-25 10:50:58-salesapp] at Proguard.io.FilteredDataEntryReader.read (filtereddataentryreader.java:87) [2014-07-25 10:50:58-salesapp] at Proguard.io.FilteredDataEntryReader.read (filtereddataentryreader.java:87) [2014-07-25 10:50:58-salesapp] at Proguard.io.JarReader.read (jarreader.java:65) [2014-07-25 10:50:58-salesapp] at Proguard.io.DirectoryPump.readFiles (directorypump.java:65) [2014-07-25 10:50:58-salesapp] at Proguard.io.DirectoryPump.pumpDataEntries (directorypump.java:53) [2014-07-25 10:50:58-salesapp] at Proguard. Inputreader.readinput (inputreader.java:228) [2014-07-25 10:50:58-salesapp] ... 6 more[2014-07-25 10:50:58-salesapp] caused by:java.lang.RuntimeException:Unexpected end of ZLIB input stream[2014-07- 10:50:58-salesapp] at Proguard.claSsfile.io.RuntimeDataInput.readInt (runtimedatainput.java:136) [2014-07-25 10:50:58-salesapp] at Proguard.classfile.io.ProgramClassReader.visitProgramClass (programclassreader.java:77) [2014-07-25 10:50:58- SalesApp] at proguard.classfile.ProgramClass.accept (programclass.java:346) [2014-07-25 10:50:58-salesapp] at Proguard.io.ClassReader.read (classreader.java:91) [2014-07-25 10:50:58-salesapp] ... MORE[2014-07-25 10:51:06-salesapp] Proguard returned with error code 1. See console[2014-07-25 10:51:06-salesapp] java.io.IOException:Can ' t read [/users/zhangxitao/work/salesapp/platforms /android/cordovalib/bin/salesapp-cordovalib.jar] (Can ' t process class [com/squareup/okhttp/internal/http/ Httpdate.class] (unexpected end of ZLIB input stream)) [2014-07-25 10:51:06-salesapp] at Proguard. Inputreader.readinput (inputreader.java:232) [2014-07-25 10:51:06-salesapp] at Proguard. Inputreader.readinput (inputreader.java:202) [2014-07-25 10:51:06-salesapp] at Proguard. Inputreader.readinput (Inputreader.java:180) [2014-07-25 10:51:06-salesapp] at Proguard. Inputreader.execute (inputreader.java:78) [2014-07-25 10:51:06-salesapp] at Proguard. Proguard.readinput (proguard.java:196) [2014-07-25 10:51:06-salesapp] at Proguard. Proguard.execute (proguard.java:78) [2014-07-25 10:51:06-salesapp] at Proguard. Proguard.main (proguard.java:483) [2014-07-25 10:51:06-salesapp] caused By:java.io.IOException:Can ' t process class [ Com/squareup/okhttp/internal/http/httpdate.class] (unexpected end of ZLIB input stream) [2014-07-25 10:51:06-salesapp] At Proguard.io.ClassReader.read (classreader.java:112) [2014-07-25 10:51:06-salesapp] at Proguard.io.FilteredDataEntryReader.read (filtereddataentryreader.java:87) [2014-07-25 10:51:06-salesapp] at Proguard.io.FilteredDataEntryReader.read (filtereddataentryreader.java:87) [2014-07-25 10:51:06-salesapp] at Proguard.io.JarReader.read (jarreader.java:65) [2014-07-25 10:51:06-salesapp] at Proguard.io.DirectoryPump.readFiles (directorypump.java:65) [2014-07-25 10:51:06-salesapp] at proguard.io.DirectoryPump.pumpDataEntries (directorypump.java:53) [2014-07-25 10:51:06- SalesApp] at Proguard. Inputreader.readinput (inputreader.java:228) [2014-07-25 10:51:06-salesapp] ... 6 more[2014-07-25 10:51:06-salesapp] caused by:java.lang.RuntimeException:Unexpected end of ZLIB input stream[2014-07- 10:51:06-salesapp] at Proguard.classfile.io.RuntimeDataInput.readInt (runtimedatainput.java:136) [2014-07-25 10:51:06-salesapp] at Proguard.classfile.io.ProgramClassReader.visitProgramClass (programclassreader.java:77) [ 2014-07-25 10:51:06-salesapp] at proguard.classfile.ProgramClass.accept (programclass.java:346) [2014-07-25 10:51:06 -SalesApp] at Proguard.io.ClassReader.read (classreader.java:91) [2014-07-25 10:51:06-salesapp] ... MORE[2014-07-25 10:51:20-salesapp] Proguard returned with error code 1. See console[2014-07-25 10:51:20-salesapp] java.io.IOException:Can ' t read [/users/zhangxitao/work/salesapp/platforms /android/cordovalib/biN/salesapp-cordovalib.jar] (Can ' t process class [Com/squareup/okhttp/internal/http/httptransport.class] (Unexpected End of ZLIB input stream)) [2014-07-25 10:51:20-salesapp] at Proguard. Inputreader.readinput (inputreader.java:232) [2014-07-25 10:51:20-salesapp] at Proguard. Inputreader.readinput (inputreader.java:202) [2014-07-25 10:51:20-salesapp] at Proguard. Inputreader.readinput (inputreader.java:180) [2014-07-25 10:51:20-salesapp] at Proguard. Inputreader.execute (inputreader.java:78) [2014-07-25 10:51:20-salesapp] at Proguard. Proguard.readinput (proguard.java:196) [2014-07-25 10:51:20-salesapp] at Proguard. Proguard.execute (proguard.java:78) [2014-07-25 10:51:20-salesapp] at Proguard. Proguard.main (proguard.java:483) [2014-07-25 10:51:20-salesapp] caused By:java.io.IOException:Can ' t process class [ Com/squareup/okhttp/internal/http/httptransport.class] (unexpected end of ZLIB input stream) [2014-07-25 10:51:20- SalesApp] at Proguard.io.ClassReader.read (classreader.java:112) [2014-07-25 10:51:20-salesapp] at Proguard.io.FilteredDataEntryReader.read (filtereddataentryreader.java:87) [2014-07-25 10:51:20-salesapp] at Proguard.io.FilteredDataEntryReader.read (filtereddataentryreader.java:87) [2014-07-25 10:51:20-salesapp] at Proguard.io.JarReader.read (jarreader.java:65) [2014-07-25 10:51:20-salesapp] at Proguard.io.DirectoryPump.readFiles (directorypump.java:65) [2014-07-25 10:51:20-salesapp] at Proguard.io.DirectoryPump.pumpDataEntries (directorypump.java:53) [2014-07-25 10:51:20-salesapp] at Proguard. Inputreader.readinput (inputreader.java:228) [2014-07-25 10:51:20-salesapp] ... 6 more[2014-07-25 10:51:20-salesapp] caused by:java.lang.RuntimeException:Unexpected end of ZLIB input stream[2014-07- 10:51:20-salesapp] at Proguard.classfile.io.RuntimeDataInput.readInt (runtimedatainput.java:136) [2014-07-25 10:51:20-salesapp] at Proguard.classfile.io.ProgramClassReader.visitProgramClass (programclassreader.java:77) [ 2014-07-25 10:51:20-salesapp] at Proguard.Classfile. Programclass.accept (programclass.java:346) [2014-07-25 10:51:20-salesapp] at Proguard.io.ClassReader.read ( classreader.java:91) [2014-07-25 10:51:20-salesapp] ... MORE[2014-07-25 10:54:53-salesapp] Proguard returned with error code 1. See console[2014-07-25 10:54:53-salesapp] java.io.IOException:Can ' t read [/users/zhangxitao/work/salesapp/platforms /android/cordovalib/bin/salesapp-cordovalib.jar] (Can ' t process class [com/squareup/okhttp/internal/http/ Httpengine.class] (unexpected end of ZLIB input stream)) [2014-07-25 10:54:53-salesapp] at Proguard. Inputreader.readinput (inputreader.java:232) [2014-07-25 10:54:53-salesapp] at Proguard. Inputreader.readinput (inputreader.java:202) [2014-07-25 10:54:53-salesapp] at Proguard. Inputreader.readinput (inputreader.java:180) [2014-07-25 10:54:53-salesapp] at Proguard. Inputreader.execute (inputreader.java:78) [2014-07-25 10:54:53-salesapp] at Proguard. Proguard.readinput (proguard.java:196) [2014-07-25 10:54:53-salesapp] at ProGuard. Proguard.execute (proguard.java:78) [2014-07-25 10:54:53-salesapp] at Proguard. Proguard.main (proguard.java:483) [2014-07-25 10:54:53-salesapp] caused By:java.io.IOException:Can ' t process class [ Com/squareup/okhttp/internal/http/httpengine.class] (unexpected end of ZLIB input stream) [2014-07-25 10:54:53- SalesApp] at Proguard.io.ClassReader.read (classreader.java:112) [2014-07-25 10:54:53-salesapp] at Proguard.io.FilteredDataEntryReader.read (filtereddataentryreader.java:87) [2014-07-25 10:54:53-salesapp] at Proguard.io.FilteredDataEntryReader.read (filtereddataentryreader.java:87) [2014-07-25 10:54:53-salesapp] at Proguard.io.JarReader.read (jarreader.java:65) [2014-07-25 10:54:53-salesapp] at Proguard.io.DirectoryPump.readFiles (directorypump.java:65) [2014-07-25 10:54:53-salesapp] at Proguard.io.DirectoryPump.pumpDataEntries (directorypump.java:53) [2014-07-25 10:54:53-salesapp] at Proguard. Inputreader.readinput (inputreader.java:228) [2014-07-25 10:54:53-salesapp] ... 6 more[2014-07-25 10:54:53-salesapp] caused by:java.lang.RuntimeException:Unexpected end of ZLIB input stream[2014-07-25 1 0:54:53-salesapp] at Proguard.classfile.io.RuntimeDataInput.readInt (runtimedatainput.java:136) [2014-07-25 10:54:53-salesapp] at Proguard.classfile.io.ProgramClassReader.visitProgramClass (programclassreader.java:77) [ 2014-07-25 10:54:53-salesapp] at proguard.classfile.ProgramClass.accept (programclass.java:346) [2014-07-25 10:54:53 -SalesApp] at Proguard.io.ClassReader.read (classreader.java:91) [2014-07-25 10:54:53-salesapp] ... More


Proguard will confuse the Java code of Cordova and its plugins, resulting in the apk run Times Cordova Error Initial class, the solution is to add the following content in Proguard-project.txt, Do not confuse Cordova and its plugins

Cordova more than 3.0 version Plus

-keep class org.apache.cordova.** {*;} -keep public class * extends Org.apache.cordova.CordovaPlugin





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.