Building DEX Failed

Unity Android users will occasionally run into a “building DEX failed” error when building, particularly with plugins. Normally, double-clicking on the error message in the bottom of the Editor will bring you to more information in the console window:

But in this case, like there will be a long java stacktrace that is incompletely displayed. What you need to do here is go the extra inch in debugging effort and bring up the Editor log, which will display the entire trace – you’ll want to search for the error and scroll to the bottom to see the real error, which in this example shows that I inadvertantly added the openfeint functions twice in my plugin directory (in two separate jar files). It really helps if you know Java, too – the more the better. At least understand what jar files are, and the java command-line tools like javac and jar!

Google
Programming
Unity

Comments Off

Permalink

Fragmented? Who’s Fragmented?

Some device statistics for my Android Market apps. I just wish I knew what “Others” included:

Google
HyperBowl
Unity

Comments Off

Permalink

Technical Gibberish

For a while, I had some system info displayed in some of my Unity apps, partly for my own benefit and partly to assist customers in reporting useful device information (wishful thinking, perhaps). I ended up removing some of it after Amazon rejected HyperBowl initially for displaying “technical gibberish”, but it remains alive in Fugu System on Android (not on the App Store – Apple rejected it as having not enough entertainment value), which I envisioned as some hybrid between a 3D benchmarking app and one of those system info apps showing device ID’s, memory usage, etc. (never mind Unity doesn’t have all those functions). In any case, the info display code serves as an example usage of the various Unity system info functions:


function Start() {
guiText.text = "Device ID: "+SystemInfo.deviceUniqueIdentifier+"\n"+
SystemInfo.deviceModel+"\n"+
SystemInfo.operatingSystem+" "+SystemInfo.systemMemorySize + "MB\n"+
SystemInfo.processorCount+" "+SystemInfo.processorType+"\n"+
SystemInfo.graphicsDeviceName+" "+SystemInfo.graphicsMemorySize+"MB\n"+
Screen.width+"x"+Screen.height+" pixels\n"+
"Multitouch "+(Input.multiTouchEnabled ? "yes" : "no")+
" Gyroscope "+(Input.isGyroAvailable ? "yes" : "no")+"\n"+
Application.systemLanguage.ToString();
}

HyperBowl
Programming
Unity

Comments Off

Permalink