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. building to support both contacts 1.6 and 2.0 apis




I am reasonably certain that if you compile the app for 1.6 but run on 2.0, the 
contacts code will work.  The caveat here is that you will only get the raw 
contacts from the master account, rather than the combined contacts from all 
active accounts; the older API just doesn't have the functionality needed to 
handle combined accounts.

I think the 1.x contacts code is *supposed* to work when targeting 2.0, but 
most people seem to use private contacts API (often without knowing this), and 
/that/ breaks in 2.0.  From what the Google folks have said on list, however, 
I'm fairly sure the core, public, authorized and official 1.x API still works 
even if you target 2.0, albeit with the same caveats as above.

If I'm wrong on that, no doubt one of the Google folks can correct.

-- 

2. Undur diri dulu

Dear master dan sifu ..
Mohon maaf 
Per hari ini saya undur dulu dari milis ini {*filter*}tara

Cuman no-mail.

Karena robot ijo-nya dah dipiara temen disini juga.

Dan mau keluar kota sebulan,
Jadi gak sempet ngoprek si ijo..

Thanks buat ilmunya.
Nanti join lagi someday

Ciao
Ids

www.indraracing.com


--~--~---------~--~----~------------~-------~--~----~
=========================
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click   http://www.***.com/ 
          Choice Apply for Group Membership

or 

 Please visit the following page:
  http://www.***.com/ 

To send a message to the owner, visit the following page:

  http://www.***.com/ ;hl=en-GB    or  
 
    id.andr...@gmail.com

For more options, visit this group at
 http://www.***.com/ 

To unsubscribe from this group, send email to
id-android+unsubscr...@googlegroups.com

Indonesian Android Community on Facebook

 http://www.***.com/ 

=========================
-~----------~----~----~----~------~----~------~--~---

3. what happened to my application's statistics?

4. Weird EditText behavior in Android 2.0

5. Network File Transfer Android Apps

6. Overriding onPrepareOptionsMenu

7. getting error while importing com.google.googlenav.map.MapPoint; ..........