Android Question Camera2 problem

jdonth

Member
Licensed User
I am trying to compile the camera2 example (https://www.b4x.com/android/forum/threads/camera2-still-images-and-videos.83920/) and am getting the following error thread:

B4A Version: 8.30
Parsing code. (0.01s)
Compiling code. (0.08s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.00s)
Generating R file. (0.17s)
Compiling generated Java code. Error
B4A line: 255
Dim PreviewBuilder As JavaObject = Camera.Create
javac 1.8.0_111
src\b4a\example3\camex2.java:400: error: cannot access CameraAccessException
_previewbuilder.setObject((java.lang.Object)(parent._camera.CreatePreviewBuilder()));
^
class file for android.hardware.camera2.CameraAccessException not found
 

Semen Matusovskiy

Well-Known Member
Licensed User
I tried this sample some monthes ago (guess, it was B4A 7.8) and tried now (B4A 8.30)
No problems with compilation.
Camera2 is enough complex, for my app I used intents. But this is another story.

You use Java 8 instead of Java 10. Doubt that this is important here.
Try to update everything in SDK manager and check android.jar path (better to set to android-27).
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Upvote 0
Top