Cloning the master branch on git and setting up eclipse via github instructions.
Cloning the master branch on git and setting up Android Studio via github instructions.
I have tried the last 2 approaches with little luck in the simulator so far. Android Studio seems to compile OF but the emptyExample then crashes in simulator. Then when trying to create new projects or run an example I get the error Plugin with id ‘com.android.application’ not found. No luck in eclipse yet bat am about to try a different version after realising the extra detail in the github instructions.
I will end up writing this app for iOS in xcode/AppCode and then porting. Will be a relatively simple app but will need camera, video through a shader and possibly accelerometer/GPS data. Would prefer to use Android Studio even though C++ support is still a ways off. Although Ideally would like to get both setups running.
With respect to Android Studio, is your local master up-to-date? For running the example, you are copying gradle.build from androidEmptyExample into another example & then updating gradle.settings?
I’ve just recently started diving into the android studio setup on windows, but I had to revert back to an older commit to get the examples running for me. I didn’t do an organized search to find the most recent commit that works, but I haphazardly checked out this one. I was able to get the examples running that I needed.
Thanks, can I ask what error you were getting before trying this? I just reset to that commit and reimported settings.gradle but no luck.
Eclipse has proven worse. Trying with the latest OF release and the recommended eclipse version on the github instructions it hangs when indexing. I have adjusted eclipse RAM and cache settings, which help but not enough. I am on a recent macbook pro retina so performance shouldn’t be an issue.
I am now in the process of deleting everything to try again from scratch!
Hmm, I haven’t gotten the com.android.application error before, but I helped someone on OSX who had it earlier today. Instead of opening up from libs/openFrameworksCompiled/project/android/, I think they tried to open up an example directly from the build.gradle file.
I feel like I’m swimming in errors. On the current version of master, ofVideoGrabber didn’t work (tested on multiple devices with various version of android). I can’t remember the specific error message. On some versions of master, I get stuck indefinitely compiling (usually on an openCV related class). Now I’m running into the issue that all of the examples work, but if I try to create my own app via copying the empty example, I hit a series of errors. E.g. if I try to re-create the sound player example, the app throws an error that it can’t find the sound file on the device.
Wish I could be more help but I’m in the same boat. Maybe I’ll trying going the scratch route too.
Thanks. Looking forward to Android Studio support but for this next project it looks like I might be better served sticking with eclipse. The only reference I can find to eclipse versions to use is for the old Juno/4.2 release, which I had no luck with. Might give the latest release a try.
Hey, you’re further than me. I had no luck with Eclipse 4.2/Juno on OSX 10.10 as the indexing didn’t work so installed 4.3/kepler. I would have tried a more recent version but that would have meant Java 1.7 where as the instructions refer to 1.6.
After adjusting eclipse’s RAM and cache settings this worked okay to import and index the project. Updating the required SDK for the imported projects as per instructions did not work. I had no luck editing the target variable as per the project.properties files so installed the older SDK. I am now able to compile examples although I have not set up a simulator to see anything yet! Will post back when I get further.
I just managed to get a custom app up and running. I ended up using java 1.8.0_40 with eclipse 4.2 (32x). I installed the android API 19 to deal with the no valid target errors. I also had some errors about the NDK, so I had to set the location in eclipse preferences (despite the path being in paths.make). All of that involved liberal rebooting of eclipse which seemed to sometimes “fix” errors.
hey sorry i need to update the guide, they deprecated ADT some months ago and it’s now a little outdated. Eclipse Luna, the latest one works the best from my experience. the indexer is kind of tricky to get right i’m trying to make a config that works but the easiest is to just disable it in window > preferences > c++
@nay the error you are getting might be releated to the simulator not having external storage. OF compresses all resources in a zip file to later uncompress them when the app is run the first time, this requires external storage (it’s called like that but in most devices is just some internal flash memory) i haven’t really tried to run apps in the simulator since it’s really slow so you’ll probably have more luck by using a real device
Thanks Arturo, I’ll give the latest eclipse a try hoping that the RAM and cache setting tweaks will be enough to hang onto indexing.
I actually don’t have an Android device yet but will give it a try when I do. However, would definitely be useful to have access to simulators even if slow when needing to test for device resolutions etc that you don’t have access to before a release.
Will Android Studio support be an official part of the 090 release? When is that release planned?