Products > Thermal Imaging

How do I configure my Android Studio to compile the FLIR SDK sample?


I have gone to the trouble of installing Java JDK (a prerequisite of running Android SDK / Android Studio), and have installed Android Studio/SDK. FINALLY after a couple hours installing these, and managing to get the Android IDE to actually run without throwing up errors (not an easy task itself), I FINALLY got it so I could start and run Android Studio. I then downloaded the FLIR One SDK including the sample app.

So I thought, "This is going to be easy from here on out, I'll just load the FLIR sample app, click a 'compile' button, copy the resulting APK file to my Android phone, and it will be good to go", but BOY OH BOY was I wrong. First it said that it needed to download the supporting files for the version of Android that the FLIR One SDK required, so I had to wait for it to autoupdate Android Studio with these files. Then when I FINALLY compiled it, there was no APK. The "build" button (unlike with other programming languages) does NOT generate a usable file. I had to search through menus and find a separate "make apk" button. So I clicked that, and got an APK file. So now I'm thinking "FINALLY I've got the working FLIR One SDK sample app", but again I was SO WRONG. I copy the APK file over to my phone and try to run it, but it appears to be a corrupt APK file, and my phone said that it was an invalid APK file!!!!!!!!!!

So now I'm going to do what I should have done from the start, ask for a step-by-step tutorial on these forums, a tutorial on EXACTLY what to do to configure a brand-spanking-new copy of Android Studio, to make it work for compiling the FLIR One SDK sample app. So somebody, PLEASE help me. Please write me a tutorial, that if I follow all the steps correctly is GUARANTIED to cause the resulting APK file to be a valid APK file.

Finally got it to compile (just recopied all the files from the FLIR One SDK), after cleaning out space on my harddrive. I think it was getting so low that the compiler caused the drive to run out of space for intermediate files, causing a corrupt output in the final APK. But now I have another question.

I've got debug version going fine. I even have created my own KeyStore and Private Key to sign the Release version of the app. But there's a problem. The release version should be called app-release.apk. However it instead is being called app-release-unaligned.apk and I don't know why it isn't aligning it (whatever that means). The debug version produces 2 files, app-debug-unaligned.apk and app-debug.apk, but the release version is only making app-release-unaligned.apk rather than creating the correct final version which should be called app-release.apk. Please tell me how to configure Android Studio to properly "align" the final release version.

Copy the app-debug.apk to your android device and install it.

e.g. with ES explorer

you must activate "unknown sources"

That's all!

alternative activate the developer mode and then Android Studio installs the apk direct on your device (after a build)


[0] Message Index

There was an error while thanking
Go to full version