Why SDK version in recovery is different from SDK version in build.prop I have Nexus 5 running RR 7.1.2 (Nougat) and of course the SDK is 25, but in TWRP Recovery i'm using ADB Shell and type `getprop ro.build.version.sdk' it say 22 (Lollipop)?

I do a clean install and upgrade TWRP still the same, please help me
The recovery is a miniature OS in itself, built with separate sources from the OS. For your case, the recovery is built from Lollipop source. This does not affect anything, for this SDK level is not representative of actual OS SDK level and therefore should not be used in any updater-script, etc.