Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6832543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:52:17+00:00 2026-05-26T22:52:17+00:00

Using Ant, I’m trying to build an Android application in release mode for distribution.

  • 0

Using Ant, I’m trying to build an Android application in release mode for distribution. My problem is at the signing process. I’ve created a keystore and alias via Eclipse using the Export Android Application wizard and the app is correctly signed if export it via Eclipse. When I try to complete the same process via Ant I reference my keystore and alias in my build.properties file:

key.store=C:\\Users\\a512091\\.android\\release.keystore
key.alias=application
key.store.password=android
key.alias.password=android

The build process is successful and I get an Application-release.apk file. I veryfied this APK with jarsigner and all files have “sm” tags. This is the tail of the output:

jar verified.
Warning:
This jar contains entries whose certificate chain is not validated.

When I try to install this APK into an emulator or device I get the following:

Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

Logcat shows signing problems on my CSS file and image assets:

11-07 11:06:20.060: WARN/PackageParser(58): Exception reading assets/www/css/base.css in /data/app/vmdl48898.tmp
11-07 11:06:20.060: WARN/PackageParser(58): java.lang.SecurityException: META-INF/XXXXX.SF has invalid digest for assets/www/res/droidhdpi/favorite_off.png in /data/app/vmdl48898.tmp
11-07 11:06:20.060: WARN/PackageParser(58):     at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:369)
11-07 11:06:20.060: WARN/PackageParser(58):     at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:272)
11-07 11:06:20.060: WARN/PackageParser(58):     at java.util.jar.JarFile.getInputStream(JarFile.java:392)
11-07 11:06:20.060: WARN/PackageParser(58):     at android.content.pm.PackageParser.loadCertificates(PackageParser.java:337)
11-07 11:06:20.060: WARN/PackageParser(58):     at android.content.pm.PackageParser.collectCertificates(PackageParser.java:508)
11-07 11:06:20.060: WARN/PackageParser(58):     at com.android.server.PackageManagerService.installPackageLI(PackageManagerService.java:5885)
11-07 11:06:20.060: WARN/PackageParser(58):     at com.android.server.PackageManagerService.access$2100(PackageManagerService.java:134)
11-07 11:06:20.060: WARN/PackageParser(58):     at com.android.server.PackageManagerService$5.run(PackageManagerService.java:4743)
11-07 11:06:20.060: WARN/PackageParser(58):     at android.os.Handler.handleCallback(Handler.java:587)
11-07 11:06:20.060: WARN/PackageParser(58):     at android.os.Handler.dispatchMessage(Handler.java:92)
11-07 11:06:20.060: WARN/PackageParser(58):     at android.os.Looper.loop(Looper.java:123)
11-07 11:06:20.060: WARN/PackageParser(58):     at android.os.HandlerThread.run(HandlerThread.java:60)
11-07 11:06:20.069: ERROR/PackageParser(58): Package com.xxxxx.xxxxx has no certificates at entry assets/www/css/base.css; ignoring!
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:52:18+00:00Added an answer on May 26, 2026 at 10:52 pm

    If you have Ant version < 1.8.3 (ant -version) try this approach for the issue with JDK 7 (based on the previous answer):

    1. Add signjarjdk7 to ANDROID_SDK\tools\ant\build.xml

      <macrodef name="signjarjdk7">
          <attribute name="jar" />
          <attribute name="signedjar" />
          <attribute name="keystore" />
          <attribute name="storepass" />
          <attribute name="alias" />
          <attribute name="keypass" />
          <attribute name="verbose" />
          <sequential>
              <exec executable="jarsigner" failonerror="true">
                  <!-- Magic key, always verbose -->
                  <arg line="-verbose -digestalg SHA1 -sigalg MD5withRSA" />
                  <arg line="-keystore @{keystore} -storepass @{storepass} -keypass @{keypass}" />
                  <arg line="-signedjar &quot;@{signedjar}&quot;" />
                  <arg line="&quot;@{jar}&quot; @{alias}" />
              </exec>
          </sequential>
      </macrodef>
      
    2. Replace 'signjar' to 'signjarjdk7' in 'release' target in the same build.xml.

    NOTE: You have to define ‘key.store.password’ and ‘key.alias.password’ propeties for your project (in project.properties or in local.properties).

    UPDATE 1:

    If your have installed Ant 1.8.3 (or later) you have a better solution:

    Open your ANDROID_SDK\tools\ant\build.xml and add two new parameters – sigalg and digestalg – in the original ‘signjar’ invocation:

    <signjar
        sigalg="MD5withRSA"
        digestalg="SHA1"
        jar="${out.packaged.file}"
        signedjar="${out.unaligned.file}"
        keystore="${key.store}"
        storepass="${key.store.password}"
        alias="${key.alias}"
        keypass="${key.alias.password}"
        verbose="${verbose}" />
    

    UPDATE 2:
    It seems this answer is deprecated after ‘signjar’ was replaced to ‘signapk’ in latest version of Android SDK tools.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to convert an existing Android build system using Ant with 'ant_rules_r3.xml' integration from
I am using Ant > 1.8 + Proguard 4.6 to build my Android project
We are using ANT for our build process and don't have plans to change
well..kind of new to Android, using ant to build something I downloaded. how can
When using ANT to build my Java application I keep getting this error. I
I'm building a Java application (using Ant with build.xml and build.property files). Now I'd
Hi I am using ant to build a scala android project. It seems my
I'm using ant to build my project, and use the 'svnversion' executable to insert
what's the point of using ant, maven, and buildr? won't the using build in
I'm trying to run my junit tests using ant. The tests are kicked off

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.