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. Need help on List Adapter


  I am extending BaseAdapter and trying to populate the List Screen on my
Activity Screen. NotifyDataSetChanged is not working as expected. Please
find the below snippet of code. Please do let me know your thoughts.

 public void onCreate(Bundle savedInstanceState) {

context = this;
config = Config.getInstance();
searchText =  new EditText(this);
 handler = new Handler() {
public void handleMessage(Message msg) {
 searchText.addTextChangedListener( new Tex{*filter*}cher() {
public void onTextChanged(CharSequence s, int start, int before, int count)
// TODO Auto-generated method stub
Log.d("on text", "String: " + s);
msgQueueAdapter = new ListAdapter(context, msgQueueList);
Message msg = handler.obtainMessage();
 runOnUiThread(new Runnable()  {
public void run() {
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
 msgQueueAdapter = new ListAdapter(this, msgQueueList);
Log.d("list", "List Display - 1" + msgQueueAdapter);
 msgQueueListView = this.getListView();


2. Call Log on HTC Hero


I have an app that changes the number being called and updates the
call log after the call to keep the original number.
In the emulator (and on most devices) everything works fine but on the
HTC Hero I can't seem to update the number in the Call Log. I run an
update but nothing happens.

Until recently I was using Android 1.5 on the Hero and I could work
around this issue by deleting the log entry and creating a new one
with all the same data, but after upgrading to 2.1 I can still delete
the old entry but when I insert the new one the only info that gets
inserted are the phone number, call type and time of call. The contact
name and number type don't get saved and it always shows on the log as
an unknown number.

It sounds to me like HTC's sense UI breaks the call log somehow. Has
anyone seen this issue and has a workaround for it? Or is there
something I might be missing about the call log?
Ultimately it's a database, right? So there must be a way to do it if
I have access to the database.

Thanks in advance,
Denis Souza


3. Force Close when running AccountManager.get(this).getAccounts()

4. Missing apps

5. .Net Web Service From Android

6. LinearLayout/TextView sizing

7. Can webview support iframe.contentDocument