Answer the question
In order to leave comments, you need to log in
Can't get android version version, why?
I'm trying to display the version in the logs
Log.d("=--=-=-=", getText(android.os.Build.VERSION.SDK_INT).toString());
if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){
Toast.makeText(getApplicationContext(), "Меньше", Toast.LENGTH_SHORT);
}
else{
Toast.makeText(getApplicationContext(), "Больше", Toast.LENGTH_SHORT);
}
Answer the question
In order to leave comments, you need to log in
Change
Log.d("=--=-=-=", getText(android.os.Build.VERSION.SDK_INT).toString());
Log.d("=--=-=-=", Integer.toString(android.os.Build.VERSION.SDK_INT));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question