Signing in debug mode

by bburd » Thu, 19 May 2011 02:49:53 GMT

Sponsored Links
 I'm trying to use command line tools to develop an Android app. I'm
calling aapt as follows:

"C:\Program Files (x86)\Android\android-sdk\platform-tools\aapt.exe"
package -f --debug-mode -M C:\MyProjects\MyAndroidProject
\AndroidManifest.xml -S C:\MyProjects\MyAndroidProject\res -I "C:
\Program Files (x86)\Android\android-sdk\platforms
\android-9\android.jar" -F C:\MyProjects\MyAndroidProject\bin

I assume that, because I've specified --debug-mode, aapt will attach a
debug certificate, making my app runnable on an emulator. But I keep
getting the message

How can I diagnose the problem?


Re: Signing in debug mode

by TreKing » Thu, 19 May 2011 04:15:06 GMT #detailed-build

*Once the .apk is built, it must be signed with either a debug or release
key before it can be installed to a device.*

TreKing <> ; - Chicago
transit tracking app for Android-powered devices


Sponsored Links

Re: Signing in debug mode

by Xavier Ducrohet » Thu, 19 May 2011 09:49:22 GMT

 The only thing the --debug-mode parameters is doing is inserting
"debuggable=true" in the manifest. (see the aapt help output)

Note that the command line you showed only packages the resources in
the apk. You'll need to add classes.dex manually to it, as well as any
other file you may need (java resources, native libraries).

Our command line build is complex, this is why we provide a full Ant
rules file. I encourage you to use it, or at a minimum to look at it
if you want to build your own build system.


Xavier Ducrohet
Android SDK Tech Lead
Google Inc.  | 

Please do not send me questions directly. Thanks!


Re: Signing in debug mode

by bburd » Fri, 20 May 2011 01:52:56 GMT

 Thank you. Understanding what aapt does and doesn't do has solved my


Other Threads

1. Good New's cupcake" development branch Merged to The master project


Once the picture is taken from the camera on the cupcake, it is
automatically saving it to the SD card. Is this a change
from how it worked on G1?

Thank you


2. Javascript event listeners are not called at the document level in a web page

I am using Android 1.1 SDK release 1 on linux. I am facing the
following problem.

Javascript document level event listeners do not work in webkit
browser.  On a web page with
javascript event listener for keydown event, the event listener is not
invoked on any key press. Instead any key press on the web page moves
the focus to URL entry field.

Event handling does not work in both of the below registration methods
inside the Android's webkit.

document.addEventListener("keydown", keydownhandler, false); or
window.addEventListener("keydown", keydownhandler, false);

function keydownhandler(e)
  alert("Inside keypresshandler(e)");

The web page with the above javascript snippet,  shows the alert
message properly in firefox and IE browsers whenever any key is
pressed. But in android's web browser,  the control never goes to the
'keydownhandler'. Rather the focus goes to the URL entry bar.

How to get this working in the Android browser?. Your  suggestion is
really appreciated.



3. How can i read messages(sms) in my inbox?

4. Problem with ListView inside ScrollView

5. WTF? Why no custom notify times possible on G1 ?!

6. I want to use more than 4M bytes heap in one application,How can I do?

7. Cornell Research Study about Android Programmers: Looking for Participants