We all know that android sdk comes complete with java sdk build in. This sdk is light weight and customized for use by the dalvik engine. Now, if we also add java jar’s along with the android app, obviously the android system will have trouble converting that java jar to dalvik. Hence the “conversion to dalvik” issue.
So now that you know what happens, lets figure out why it happens.
The zxing library today does not allow a clean way to include the library into your project. Ideally they should provide a android_zxing.jar file that we can just include and freak out. But, we need to download the source, take the relevant folders import it into a new project and add that project as a dependent project to our customized app.
Now, when you do the import a whole lotta things happen. Each directory that you import from the zxing download has androidmanifest.xml, default.properties.. So things get over written again and again and again. So once you have imported the directories, close the project. Delete it, reimport the “just imported project” and try. Should work.
Refer to my blog (https://mcondev.wordpress.com/2011/03/02/zxing-into-android-for-barcode-reading-functionality-original-project-100mb-imported-3mb/) on this for the import process.
Dont forget to import the “android” folder last.
Have fun. If you get issues, post comments, I’ll try to respond.