ActivityMainBinding unsolve reference

I try use the API cameraX but ActivityMainBinding, seems do not exist

someone konws how can I solve this

Best I can give you is a Stack Overflow link, sorry: android - Unresolved reference:ActivityMainBinding - Stack Overflow

I don’t do Android development so no idea. :slight_smile:

Your project seems be a Compose project, does it have an activity_main.xml in layout res?

if your project has activity_main.xml

  1. Check viewBinding true in module build.gradle under buildFeatures in android block.
  2. It should be ‘ActivityMainBinding’ not ‘ActivityMainBinder’.
1 Like

You are right, I am trying to implement a X camera API tutorial and in the example, xml file is used to create the UI, when I change my project to XML it works fine:smile