if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){...do something..}
unable to find N.how to check build version greater than android N
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){...do something..}
unable to find N.how to check build version greater than android N
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
// perform Opertaion
}
This Must Work. Enjoy.
Code name Version API level
Oreo 8.0 API level 26
Nougat 7.1 API level 25
Nougat 7.0 API level 24
You should check Build.VERSION.SDK_INT >= Build.VERSION_CODES.N
The “O” version is a provisional API level that is usable only for development and testing during the Android O Developer Preview.
the solution is I am using an app (build.gradle) build-tools version "23.0.3" so I was unable to find N and I changed to 25.0.1 and it was working fine.
the minimum build tool version required for N is 24.