I am getting this error "This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times."
My app still working but this error is annoying.
Can anyone help?
The most common reason for this error can be the usages of outdated Android SDK
tools that are unable to understand the most recent "SDK XML"
files.
You should update your SDK tools
to the most recent version that supports the "SDK XML"
, Version 3 should solve the problem.
This is a possible procedures to upgrade your SDK tools
:
Android Studio
.File
->Settings
->Appearance & Behaviour
->System Settings
->Android SDK
.SDK Manager
and select SDK Tools
.Android SDK Built-Tools
.Apply
to install it.Android Studio
.rebuild
your Application.You can also try Invalidate Caches
and to clone
the project again.
Also check this Update the IDE and SDK tools and this sdk - How to update Android Studio automatically?