Search code examples
zxing

zxing : forFragment Cannot resolve symbol


How to fix this?

IntentIntegrator test = new IntentIntegrator.forFragment(this);

forFragment, forforSupportFragment too

Cannot resolve symbol


Solution

  • Your invocation is wrong. Should be

    IntentIntegrator test = new IntentIntegrator().forFragment(this);

    Notice the first parentheses.

    or

    IntentIntegrator test = IntentIntegrator.forFragment(this);

    Sorry but I used the older version, so I am not sure how the invocation looks right now.