This error took me forever to debug. But, at the end it all came down to whether you have made use of two "implementation" sources that do similar things. For example if you use a custom seekbar, from two different sources, both the seekbars will change the value of tools:max. This will cause the problem. It is the same reason why even you are getting the same error
error: resource previously defined here
If you have used two different implementation which are similar, remove one of them or comment and check it will be solved
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…