detect SDK version automatically