We are about to switch to a new forum software. Until then we have removed the registration on this forum.
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???
Answers
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: // https://github.com/bytedeco/javacpp/wiki/Gradle // https://docs.gradle.org/current/dsl/org.gradle.api.tasks.compile.JavaCompile.html
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.
Kf
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
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:
@OldCat7 Are you on OSX? Install gradle via homebrew (
brew install gradle
), then navigate to the "app"-subfolder in your project folder and do agradle assembleDebug
there... You will find the apk inapp/build/outputs/apk
Afterwards you need to install it viaadb
manually...@OldCat Sorry, I had a typo in my initial post. It must be
gradle assembleDebug
I missed the l in assemble...