Dalvik compilation problems with Android / Eclipse
Started working on an Android version of an existing security tool. After setting up the basic screens, I started importing some of the existing Java code. I expected some issues, of course, but I ran into a maddening one. Eclipse started complaining of this:
[2010-01-14 22:41:43 - MyApp] trouble writing output: null [2010-01-14 22:41:43 - MyApp]Conversion to Dalvik format failed with error 2
Trying to Run or Debug would bomb with messages like:
[2010-01-14 22:45:21 - MyApp]Android Launch! [2010-01-14 22:45:21 - MyApp]adb is running normally. [2010-01-14 22:45:21 - MyApp]Performing com.wikidsystems.android.WiKID activity launch [2010-01-14 22:45:21 - MyApp]Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'WiKID_1.x' [2010-01-14 22:45:21 - MyApp]Uploading MyApp.apk onto device 'emul<script src="http://greghaygood.com/sites/all/modules/tinytinymce/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js?T" type="text/javascript"><!--mce:0--></script>ator-5554' [2010-01-14 22:45:21 - MyApp]Failed to upload MyApp.apk on device 'emulator-5554' [2010-01-14 22:45:21 - MyApp]java.io.IOException: Unable to upload file: Local file doesn't exist. [2010-01-14 22:45:21 - MyApp]Launch canceled!
Sometimes it would just say
[2010-01-14 22:48:21 - MyApp]Android Launch! [2010-01-14 22:48:21 - MyApp]adb is running normally. [2010-01-14 22:48:21 - MyApp]Unable to locate MyApp.apk!
Googling only turned up various (mostly 2008 or early 2009) posts about Linux folks who had gcj installed, or suggestions to just Project->Clean, or Delete and Re-import. None of those worked. So I tried creating a new project, and pulled things over. As soon as I pulled in a Base64 class (downloaded from SourceForge), the errors started again. Removing the class cleared it up again.
I guess the class is using some Java constructs that aren't compatible with Android's environment? I wish it would indicate which rather than bombing out. I'll start looking for either (a) fixes, or (b) a new Base64 routine that is compatible. The Android docs refer to a util package that contains Base64 en/de-coders, but I can't find actual classes
Throw me any suggestions if you've found them.













