I know you are learning Android Programming. You can try below solution to fix the error.
I can tell you the actual cause of your error is not at the object creation but it is present at more than one place it is usually found at "enableAutoManage" invocation while Building your Client object.
I have found the required API doc. it clearly suggests that it will automatically do a life cycle management just by calling the methods on the onStart & onStop methods of your activity.
So if you are planning to use the same object across all the activities then you must avoid calling the "enableAutoManage" and invoke your apiObject.connect(use in onStart of activity) and the apiObject.disconnect() (use in onStop of activity).
This worked for me so I am very sure that it will work for you too.