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 8541767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:54:20+00:00 2026-06-11T11:54:20+00:00

When I run ant debug from the command line, I get the following error

  • 0

When I run “ant debug” from the command line, I get the following error message:

[apkbuilder] keytool error: java.io.FileNotFoundException: \stulab2\folderRedir
ection$.android\debug.keystore (The system cannot find the path specified)

BUILD FAILED
e:\programs\java\android-sdk\tools\ant\build.xml:919: The following error occurred while executing this line:
e:\programs\java\android-sdk\tools\ant\build.xml:930: The following error occurred while executing this line:
e:\programs\java\android-sdk\tools\ant\build.xml:295: com.android.sdklib.build.ApkCreationException: Unable to get debug signature key
        at com.android.sdklib.build.ApkBuilder.getDebugKey(ApkBuilder.java:277)

A very long stack trace follows.

The problem is that I am on a public computer and do not have write access to the folder where Ant expects to find .android\debug.keystore. Some research found the following in the Android documentation:

If necessary, you can change the location/name of the debug keystore/key or supply a custom debug keystore/key to use. However, any custom debug keystore/key must use the same keystore/key names and passwords as the default debug key (as described above). (To do so in Eclipse/ADT, go to Windows > Preferences > Android > Build.)

Unfortunately, this doesn’t explain how to change the locationof the debug keystore using the command-line tools.

Several months ago, someone asked basically the same question here on stackoverflow: How can I specify location of debug keystore for Android ant debug builds?. The best answer so far is to rewrite the -do-debug target. From what I can tell, I would also need to set the properties specified.

One problem with this answer is that it uses the same properites as the release build does. Also, it would be nice to simply set the correct properties rather than rewriting (and debugging) the whole -do-debug target. Does anyone know if there are properties that can be set to specify the location of the debug.keystore file?

  • 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-06-11T11:54:21+00:00Added an answer on June 11, 2026 at 11:54 am

    In .bashrc, set the ANDROID_SDK_HOME environment variable to the location of your Android SDK installation. For example:

    export ANDROID_SDK_HOME="/home/myusername/path/to/androidsdk"
    

    Then, in a new shell, running ant debug creates a ${ANDROID_SDK_HOME}/.android/debug.keystore file.

    Alternatively, without changing the variable globally, you can simply run:

    ANDROID_SDK_HOME="/home/myusername/path/to/androidsdk" ant debug
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run ant task, however I get the following error: [javadoc]
Can not run following SQL from ant's sql task : BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE( queue_table =>
I made a project and when I run ant install I get the following:
How can you run AsUnit test runner from Ant? I'm on the Mac OS
I want to run a VBScript file from an Ant script. How can I
Is there a way to get individual ant tasks to run quietly? I know
I run command: sudo apt-get install phpmyadmin to install phpMyAdmin. Then I enter address:
From the docs : This plugin provides the ability to run Ant tasks from
When I try to run ant in the CLI, I get the BUILD FAILED
I'm compiling DrJava by following these instructions. But when I run ant jar ,

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.