I have deactivated the subscription in the app. I am trying to reactivate it with the activation code. Now it always says: "Please connect to the Internet!"
I'm sorry, I'm completely lost as to where you are and what you are seeing. I don't even know what program version you have installed.
Posting images of what you are doing and where would help.
I don't know why you would have deactivated the subscription or even what subscription it was.
As an avast Free user it isn't clear to me what you have done (having never gone through this experience). If you have deactivated the 30 day free trial of Avast Premium, I doubt you would be able to reactivate that. As far as I'm aware you can only use the Avast Premium free trial once.
Or have you purchased Avast Premium ?
In which case you should have received an email with that subscription/license number.
Surely if you open your Avast Account -
https://account.avast.com/#/ - there should be a Manage Subscriptions option and there could be no issue of your not being connected to the internet.