I’ve reformatted your code.
I believe you’re saying that you cannot compile the code fragment due to the method error in the title.
Can you provide any more information about your setup:
- Eclipse or Android Studio?
- which Android version are you targetting?
- have you imported TwitterSession / TwitterCore and do you have your classpath setup properly (the Fabric wizard should have been able to help you with setting up your Gradle build correctly, but just checking).