How Do I Fix A Java.lang.stackoverflow Exception?
Im not sure what to do here. I've looked at the logcat cat and I know that its between my MainActivity class and my DrawingTools class. I've also listed the line numbers to help id
Solution 1:
You have a circular reference on both classes
DrawingTools class declares a callMain = new MainActivity();
, which will be created on init
On the other hand, MainActivity class declares DrawingTools callDT= new DrawingTools();
which will also be provided at init...
In this scenario, one class depend of the other to be constructed, and viceversa.
Post a Comment for "How Do I Fix A Java.lang.stackoverflow Exception?"