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
\MyActivity-debug-unaligned.apk

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
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

How can I diagnose the problem?

-- 



Re: Signing in debug mode

by TreKing » Thu, 19 May 2011 04:15:06 GMT


 



 http://developer.android.com/guide/developing/building/index.html #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 < http://sites.google.com/site/rezmobileapps/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.

Xav






-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
 http://developer.android.com  |  http://tools.android.com 

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
problem.

-- 



Other Threads

1. Need help on List Adapter

Guys,

  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) {

super.onCreate(savedInstanceState);
 initialize();
context = this;
config = Config.getInstance();
searchText =  new EditText(this);
 handler = new Handler() {
 @Override
public void handleMessage(Message msg) {
msgQueueAdapter.notifyDataSetChanged();
context.msgQueueAdapter.notifyDataSetChanged();
msgQueueAdapter.notifyDataSetInvalidated();
}
};
 searchText.addTextChangedListener( new Tex{*filter*}cher() {
 @Override
public void onTextChanged(CharSequence s, int start, int before, int count)
{
// TODO Auto-generated method stub
Log.d("on text", "String: " + s);
loadData(s.toString());
msgQueueAdapter = new ListAdapter(context, msgQueueList);
Message msg = handler.obtainMessage();
handler.sendMessage(msg);
searchText.bringToFront();
 runOnUiThread(new Runnable()  {
 @Override
public void run() {
msgQueueAdapter.notifyDataSetChanged();
searchText.setCursorVisible(true);
searchText.setClickable(true);
}
});
}
 @Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
 }
 @Override
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();
msgQueueListView.addHeaderView(searchText);
 setListAdapter(msgQueueAdapter);
msgQueueAdapter.notifyDataSetChanged();
this.msgQueueAdapter.notifyDataSetInvalidated();
}

-- 

2. Call Log on HTC Hero

Hi,

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