Signing APK and "Conversion to Dalvik format failed with error 1"

by Ian » Sat, 11 Jul 2009 01:05:19 GMT


Sponsored Links
 Help!!!!!

I've been trying to use Eclipse and the Export Wizard to create a
signed apk.

unfortunately, I cannot seem to generate an UNSIGNED apk.  Every time
I "clean and build" I get the error below, which I read I can get rid
of by "reload" or refresh then building again.  however, the debugger
automatically signs with the debug key after I do this, defeating the
purpose.


-----------------------------
log excerpt:
[2009-07-09 18:19:09 - EatAndRunDroid] Creating 'C:\Documents and
Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_'
[2009-07-09 18:19:09 - EatAndRunDroid] Writing all files...
.....STUFF.....
[2009-07-09 18:19:09 - EatAndRunDroid] Generated 18 files
[2009-07-09 18:19:09 - EatAndRunDroid] Included 0 files from jar/zip
files.
[2009-07-09 18:19:09 - EatAndRunDroid] Checking for deleted files
[2009-07-09 18:19:09 - EatAndRunDroid] Done!
[2009-07-09 18:19:09 - EatAndRunDroid] ignored resource C:\Documents
and Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
[2009-07-09 18:19:09 - EatAndRunDroid] no classfiles specified
[2009-07-09 18:19:09 - EatAndRunDroid] Conversion to Dalvik format
failed with error 1


--~--~---------~--~----~------------~-------~--~----~



Signing APK and "Conversion to Dalvik format failed with error 1"

by Ian Gavalakis » Sat, 11 Jul 2009 01:05:19 GMT


 update:

when I try to "export unsigned" it fails because no APK was generated,
likely due to the error.  again, reloas/build-again creates an exportable ak
but it's signed with debug key... useless...

p.s. Romain, please forgive me for including you, but you seem to be one of
the best responders for Google on Android.  I spent a day on this issue w/o
success.


[2009-07-09 18:41:13 - EatAndRunDroid] ignored resource C:\Documents and
Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
[2009-07-09 18:41:13 - EatAndRunDroid] Using default debug key to sign
package
[2009-07-09 18:41:13 - EatAndRunDroid] Packaging C:\Documents and
Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_
[2009-07-09 18:41:13 - EatAndRunDroid] Packaging classes.dex
[2009-07-09 18:41:14 - EatAndRunDroid] Packaging
/EatAndRunDroid/src/com/eatandrun/bft.gpx into com/eatandrun/bft.gpx
[2009-07-09 18:41:14 - EatAndRunDroid] Build Success!


---------- Forwarded message ----------
From: Ian <pale.cold.f...@gmail.com>
Date: Thu, Jul 9, 2009 at 6:28 PM
Subject: Signing APK and "Conversion to Dalvik format failed with error 1"
To: Android Developers <android-developers@googlegroups.com>


Help!!!!!

I've been trying to use Eclipse and the Export Wizard to create a
signed apk.

unfortunately, I cannot seem to generate an UNSIGNED apk.  Every time
I "clean and build" I get the error below, which I read I can get rid
of by "reload" or refresh then building again.  however, the debugger
automatically signs with the debug key after I do this, defeating the
purpose.


-----------------------------
log excerpt:
[2009-07-09 18:19:09 - EatAndRunDroid] Creating 'C:\Documents and
Settings\gavalakis\workspace\EatAndRunDroid\bin\resources.ap_'
[2009-07-09 18:19:09 - EatAndRunDroid] Writing all files...
.....STUFF.....
[2009-07-09 18:19:09 - EatAndRunDroid] Generated 18 files
[2009-07-09 18:19:09 - EatAndRunDroid] Included 0 files from jar/zip
files.
[2009-07-09 18:19:09 - EatAndRunDroid] Checking for deleted files
[2009-07-09 18:19:09 - EatAndRunDroid] Done!
[2009-07-09 18:19:09 - EatAndRunDroid] ignored resource C:\Documents
and Settings\gavalakis\workspace\EatAndRunDroid\bin\.\resources.ap_
[2009-07-09 18:19:09 - EatAndRunDroid] no classfiles specified
[2009-07-09 18:19:09 - EatAndRunDroid] Conversion to Dalvik format
failed with error 1

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Signing APK and "Conversion to Dalvik format failed with error 1"

by Roman » Sat, 11 Jul 2009 02:25:07 GMT


 ased on your description I assume that you can build successfully the
APK which is located in the bin folder of your project (of course it's
signed with the developer key).

Normally when you select the option "Android Tools->export unsigned
application package" a window pops up where you specify the location
of your new unsigned application. If this step does not work with your
application, did you try the steps with other applications to find out
whether it is related to your project or Eclipse setup?

You could also try to use the export Wizard to use your own keystore
to sign your application with your own key. The export wizard can be
found in the overview tab of your Manifest file. In this view you can
select exporting an unsigned APK or use your own created signature. Of
course to load an unsigned APK on a device you would have to go
through the signing process with your own created key.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
T Mobile stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Jul 9, 3:49pm, Ian Gavalakis <pale.cold.f...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Signing APK and "Conversion to Dalvik format failed with error 1"

by Ian » Sat, 11 Jul 2009 07:10:22 GMT


 hanks for the response...

I did a full clean reinstall of Eclipse Galileo + ADT 0.9.1 + SDK
1.5_r2

I created a new project called "Test" with no user code and referenced
Google Maps api.

I compiled and got this:

[2009-07-10 18:56:39 - Test] no classfiles specified
[2009-07-10 18:56:39 - Test] Conversion to Dalvik format failed with
error 1

If I try "export unsigned apk" it says "no Test.apk" so cannot export.

Then, I "refreshed" and built again with no errors.

[2009-07-10 19:06:09 - Test] Using default debug key to sign package
[2009-07-10 19:06:09 - Test] Packaging classes.dex
[2009-07-10 19:06:09 - Test] Build Success!

Now, export works, but the apk was signed with debug key and I think
you cannot resign with private key... am I wrong?

Checking the news boards, it seems this problem was never fixed but
people worked around by "refreshing" then rebuilding, but I don't see
how they could make a public release with this issue. Am I to assume
everyone used ant manually to release onto the market? Looking at the
Google I/O videos, it seems internally they only use Ant and nobody is
keeping Eclipse plugin up to date.

The export wizard works if there is an apk file... it doesn't care if
it's already signed with the debug key... maybe this doesn't matter?

-Ian


On Jul 10, 2:24pm, Roman <roman.baumgaert...@t-mobile.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Signing APK and "Conversion to Dalvik format failed with error 1"

by Ian » Sat, 11 Jul 2009 07:40:52 GMT


 ere's an end log excerpt after clean and build for first time:

I don't like how it "ignored resource" ... that file has the guts of
my app...

again, refresh and build afterwards works but it signs with debug api.

export wizard doesn't work unless I do the refresh/rebuild
("missing .apk")

your help is greatly appreciated... I am recently unemployed and need
a new source of income... you're helping a man learn how to fish
instead of suck on society... thanks


[2009-07-10 19:35:03 - EatAndRunDroid] Writing all files...
[2009-07-10 19:35:03 - EatAndRunDroid] 'assets/
health.db' (compressed 66%)
[2009-07-10 19:35:03 - EatAndRunDroid] 'res/drawable/
eatandrun.png' (not compressed)
.....files.....
[2009-07-10 19:35:03 - EatAndRunDroid] 'resources.arsc' (not
compressed)
[2009-07-10 19:35:03 - EatAndRunDroid] Generated 18 files
[2009-07-10 19:35:03 - EatAndRunDroid] Included 0 files from jar/zip
files.
[2009-07-10 19:35:03 - EatAndRunDroid] Checking for deleted files
[2009-07-10 19:35:03 - EatAndRunDroid] Done!
[2009-07-10 19:35:03 - EatAndRunDroid] ignored resource C:\Documents
and Settings\palecoldfire\work2\EatAndRunDroid\bin\.\resources.ap_
[2009-07-10 19:35:03 - EatAndRunDroid] no classfiles specified
[2009-07-10 19:35:03 - EatAndRunDroid] Conversion to Dalvik format
failed with error 1


On Jul 10, 7:10pm, Ian <pale.cold.f...@gmail.com> wrote:
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Could title bar of activity listen to click event?

Hi all

I would like to make my activity do something when user clicked the
title bar.
But I could not find any information about how to manipulate the title
bar.
Please kindly give me some advices.

Thanks in advance.

Regards
Milton
--~--~---------~--~----~------------~-------~--~----~

2. absolute_x and absolute_y property in Hierarchy Viewer

Hi,

In Hierarchy Viewer, it has absolute_x and absolute_y property. Can
you please tell me what are the corresponding value in the Java class?
is it 'mScrollX' 'mScrollY' of teh android/view/View.java? If not, can
you please tell me what is that.

Thank you.

--~--~---------~--~----~------------~-------~--~----~

3. sd-card picture in grid view

4. Custom theme issues

5. Does android emulator supportalsa(not oss)?

6. Implementation of HSDPA / HSUPA

7. How to listen from ENDCALL button