Android Question Camera2 problem


Licensed User
I am trying to compile the camera2 example ( 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\ error: cannot access CameraAccessException
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


B4X founder
Staff member
Licensed User
Upvote 0