No; it says so itself
Consider closely the subtle difference in words, merely from the sentences translated into English.
He may lengthen his days, but not lengthen them like an evening shadow.
Abbreviated from both verses in various versions, showing the same subtle difference:
Ecclesiastes 8:12-13
(NASB)
Although a sinner does evil a hundred times and may lengthen his life
...
he will not lengthen his days like a shadow
(NLT)
But even though a person sins a hundred times and still lives a long time
...
Their days will never grow long like the evening shadows.
(ESV)
Though a sinner does evil a hundred times and prolongs his life
...
neither will he prolong his days like a shadow.
Also, the difference may have been with a common saying
This version shows another stark difference between a bad way of thinking vs a common, wise saying...
(CEV)
They commit hundreds of crimes and live a long time, in spite of the saying:
Everyone who lives right
and respects God
will prosper,
but no one who sins
and rejects God
will prosper or live very long.
It's not a contradiction; it is a contrast
Here were two reasons for believing it isn't a contradiction. First, there was the simple clarification difference of "like a shadow" in many English translations. Second, the CEV suggests that there was the thinking to "do evil and promote one's days" contrasted to the wise saying that went contrary to that.