Exporting APK from eclipse (ADT) silently crashes
Solution 1
Disable Project/Build Automatically when you are exporting
I think is a problem of Eclipse unable to detect the Android command is still working or something similar.
Of course there is ever the option of APK generation using Ant outside Eclipse you can generate an Ant build.xml from your Eclipse project more info in official Android docs
Solution 2
Disable Project->Build Automatically
. I've noted that this works for me.
Solution 3
Disable project/build Automatically before export the apk.
Comments
-
whalabi over 4 years
Every time I try to export an APK from Eclipse (tried Juno and Indigo) on Mac, eclipse crashes after a few seconds
This used to work fine on my current setup.
Running the app straight (debug mode) on my phone works fine.
The error from the console is:
Invalid memory access of location 0x10073f113 rip=0x101f656f7 Bus error: 10
I'm using Mac OS X 10.7.4 on a ~2010 MacBook Pro, with the following java:
java version "1.6.0_33" Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720) Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
I'm using ADT 20.
I've tried reinstalling Eclipse and the Android SDK, and re-downloading ADT.
The Eclipse error view doesn't show anything
Any ideas of different methods I can try, or other ways to investigate what's going wrong?
Cheers
Update: For anyone coming along post-2014, you should be using Android Studio, which doesn't have this problem.
-
whalabi almost 12 yearsDidn't do the trick I'm afraid! I installed this package here: support.apple.com/kb/DL1515
-
whalabi over 11 yearsI've moved on from this a while ago but given the amount of upvotes your answer has I'll assume it works
-
BasicPleasureModel over 11 yearsNo idea why but this also worked for me on Ubuntu Linux (Dell XPS13 running Project Sputnik distro with latest ADT Bundle). Problem started without any changes or warning, one day it worked the next it didn't. Increase to heap size didn't fix it but as soon as I turned off auto build it was fine. Weird.
-
pavloskkr over 11 yearsCan't believe this is still happening. So essentially the default Android development kit crashes everytime when you try to export an APK. Incredible.
-
PokerIncome.com over 11 yearsThis works for me as well but it's too much work to turn on/off build automatically every time. It only crashed recently for me after I updated ADT and Android SDK on Mac. I didn't need to do it for years.
-
sanna over 11 yearsI set the build output to Normal as is described here: stackoverflow.com/questions/7843436/… and then Eclpise didn't crash. ADT 21.1.0 on Eclipse Juno.
-
Ernest over 11 yearsLife saver! I lost count the number of times Eclipse kept on crashing on my Ubuntu VM. Success rate was 2%.. now 100% :-) Thank u!!
-
wkhatch about 11 yearsIt's more than disabling auto build; but not sure what specific voodoo you have to go through before it finally works, other than cleaning, restarting eclipse, cleaning again. Completely ridiculous
-
StackOverflowed almost 11 yearsI can't believe this was all it was... it drove me nuts.
-
elbuild over 10 yearsI really can't believe it. It worked flawlessy for months, than I updated ADT and it stopped working (success rate 5% maybe..). Your solution worked perfectly...shame on ADT coders.
-
Borislav Gizdov over 10 yearsI think for me it started when my project became bigger with about 10+ included library projects. I was wonder why when exporting APK eclipse is rebuilding the whole workspace. Now I realize that while building apk, the workspace is rebuilding also and eclipse is crashing. I was getting also errors that some library jar is not readable, because it was rebuilded in the same time. For smaller projects the eclipse rebuild faster and maybe crashing is not every time.
-
Dimosthenis Kontogiorgos over 10 yearsIt was already disabled in my case. I just had to enable it and disable it again in order to work.
-
Beuj over 10 yearsWow, I still need it today... You save my day :)
-
ertan2002 over 10 yearsthank you man, you saved my time.. I am using macOS and I had this error in one project but I did what you wrote.. and It works. Thank you
-
Rarw over 10 yearsHow is this even still a bug?
-
Ziad Akiki over 9 yearsAlso if build automatically is checked, even thought eclipse would export but the exported apk will crash whenever you try to run it over your device (no compilation/execution errors in the debug).
-
tricknology over 9 yearsThe problem persists with Eclipse Luna, this solution works with Eclipse Luna
-
Josh almost 9 yearsEclipse and Android studio are more bug ridden than a cheap hostal mattress. Incredible.
-
Alp about 8 yearsI have been wrestling with this problem for a day. STS 3.6.4 + libgdx 1.6.1 on OSX. This combination used to work but for some reason it decided to fail when I was about to release (just to drive me crazy I guess). So this problem still lurks in the muddy waters and above solution worked like a charm for me. Thank you.!