KetaiCamera extremely slow when compiled from Android Studio

edited September 24 in Android Mode

I face an odd behaviour when I compile my sketch from within Android Studio (what I have to to because I am using a JNI library dependency):

The same app (namely the CameraGettingStarted example sketch from Ketai library examples) has about 15FPS when I compile from the processing app and only about 3-4 FPS when I use Android Studio.

I just imported the temporary build folder into Android Studio, so basically everything (manifest, build.gradle etc.) is untouched.

Does anyone have an idea???


  • edited October 3 Answer ✓

    I found the solution: In build.gradle i found the following:

    // We create a variant of the compile task, where we use the Eclipse Compiler for Java // (ECJ) instead of the JDK (which would require the user to download and install // the Oracle JDK). Inspired by the following: // //

    When building in Android Studio, the gradle wrapper seems to always use JDK instead of ECJ.

    When building from command line by gradle assembleDebug in the app folder it builds using ECJ and KetaiCamera works fine...

    Why that is like that I have no idea...

  • Thxs for sharing your findings. Probly @codeanticode could be interested in this detail.


  • Thanks for the notice. Yes this is pretty odd, worth discussing with the Ketai folks as well.

  • Yep, I issued it to their github issue tracker

  • edited October 3

    Anyone know of another solution, I have the same problem with KetaiCamera and try with the solution given by surumadurum but I have some problems with the terminal and the command gradle assembeDebug. I'm sorry for my English.

  • Just a note (not an answer to OldCat07):

    The open Ketai issue is here:

  • edited October 3

    @OldCat7 Are you on OSX? Install gradle via homebrew (brew install gradle), then navigate to the "app"-subfolder in your project folder and do a gradle assembleDebug there... You will find the apk in app/build/outputs/apk Afterwards you need to install it via adb manually...

  • @OldCat Sorry, I had a typo in my initial post. It must be gradle assembleDebug I missed the l in assemble...

Sign In or Register to comment.