I got this when trying to export the APK after compiling. conversion to dalvik format failed with error 1.Select all the Android SDKs til API Level 8 (Android 2.2). In Eclipse: Window -> Android SDK Manager. If you’re missing the directories android-3, android-4, android-7, android-8, you need to download/install them. Check C:\Users\yourname\AppData\Local\Android\sdk\platforms.
SL4A needs APIs from the older Android SDK platforms. Missing Android SDK files when compiling.(Just in case anyone else runs into them too.) Now here are the problems I ran into and how I fixed them. Instead of the “official” SL4A, Use hg to clone the SL4A repository from Paola Garcia‘s branch: The step you’ll want to substitute is when you Import your project source code. I think most of the problems are because the post was written in 2011, and the latest libraries and SDKs in 2014 don’t play as nicely together. I’m sharing my solutions in case anyone else runs into them too. I’m writing this post because I ran into some problems using the instructions above. The last “how to package your app” part doesn’t really apply to you, since you just want to build SL4A. It was a good learning experience for me.įirst, follow the first 2/3rds of this post:ĭo only the “compile” steps. Good news! It’s not really that hard because someone was kind enough to leave instructions. She said she fixed the problem by changing the preview format from JPEG to NV21: Thanks Paola!īut while the fix is simple, the hard part is you have to build a new SL4A app (APK) with the fix. She was cheerfully answering everyone’s questions all over the place. I found Paola Garcia‘s solution everywhere I looked on the internet. On some phones, if you try starting the webcam using SL4A, you will get the following exception: