Eclipse - should I clean the project before exporting the APK?

After several nightmares at night, I somehow got into the paranoid habit of clicking β€œProject β†’ Clean ...” in Eclipse every time I was going to export the signed /unsigned.APK for upload to the App Store. I can only assume that, some time in the distant past, this seemed like a necessary defense when debugging any external JAR or otherwise.

This adds several tedious minutes to the overall export process, especially with multiple builds and / or applications.

Is this a necessary step or just paranoia?

+6
source share
2 answers

Project cleanup will recompile all your classes, and this may fix some problems caused by the fact that the R.java class causes the resource identifier to change, but already compiled classes that have not been added to this identifier no longer exist or do not change.

+1
source

I would consider a build system using Maven, Ant, or the upcoming Gradle. This avoids problems with damaged workspaces and makes it easy to integrate automated testing; for example UnitTests or a simple question: "Does it work on the Android version of XY?"
I prefer Jenkins / Hudson as a build server.

Especially when you have several applications for different purposes, it can be cumbersome to start the entire export manually.

Ant using Jenkins: this and this
New Gradle build system: this

+1
source

All Articles