ChatGPT解决这个技术问题 Extra ChatGPT

Exporting APK from eclipse (ADT) silently crashes

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.


j
jmarranz

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


I've moved on from this a while ago but given the amount of upvotes your answer has I'll assume it works
No 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.
Can't believe this is still happening. So essentially the default Android development kit crashes everytime when you try to export an APK. Incredible.
I 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.
I 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.
n
nanofarad

Disable Project->Build Automatically. I've noted that this works for me.


The problem persists with Eclipse Luna, this solution works with Eclipse Luna
L
Luna Kong

Disable project/build Automatically before export the apk.

https://i.stack.imgur.com/oQzOH.png


s
san

This seem to be problem with your JVM. Can you update your java and check again. Also check this link


Didn't do the trick I'm afraid! I installed this package here: support.apple.com/kb/DL1515
M
Michael Petrotta

project/ clean worked for me. I think it could be related to the building of the project, as other users have posted.


T
Toni Gamez

The problem has gone until I have update ADT and Eclipse. I don't know which one solve the issue. Now it's working smoothly for severeal signed export, with:

ADT Version: 22.2.1.v201309180102-833290

Eclipse Juno Service Release 2 Build id: 20130225-0426

Gentoo Linux running Java 1.7.0_45-b18.

UPDATE: Few exports after, I still get crashes from time to time, but no very frequently.


S
SadieYu

may be you should try to add execute authority . you can try something like this

first close auto-build

cd /home/your name/android-dev/sdk/tools/

sudo chmod +x zipalign

done and good luck to you


S
Siddharth

I used the disable Build Automatically for months now, until I realized that AWS plugins were slowing down the entire launch process. I uninstalled all AWS plugins from Help->InstallationDetails and everything now works perfectly as before. I do not need to disable Build Automatically any more.


关注公众号,不定期副业成功案例分享
Follow WeChat

Success story sharing

Want to stay one step ahead of the latest teleworks?

Subscribe Now