- List of Android version names
- Содержание
- Cupcake
- Donut
- Eclair
- Froyo
- Gingerbread
- Honeycomb
- Ice Cream Sandwich
- Jelly Bean
- KitKat
- Lollipop
- Marshmallow
- Nougat
- Android 10
- Tek Eye
- Android Versions by Name, Number, Availability and API Level
- List of Android Versions and Their Names, API Level and Dates
- Do you have a question or comment about this article?
- How to get the versionCode and versionName of your app
- EnvyAndroid
- EnvyAndroid
- versionCode
- versionName
- Accessing it
- Как получить номер сборки/версии вашего приложения для Android?
- ОТВЕТЫ
- Ответ 1
- Ответ 2
- Ответ 3
- Ответ 4
- Ответ 5
- Использование Gradle и BuildConfig
- Получение VERSION_NAME из BuildConfig
- Возвращает ли пустая строка для VERSION_NAME?
- Удаление versionName и versionCode из AndroidManifest.xml
- Ответ 6
- Ответ 7
- Ответ 8
- Ответ 9
- Ответ 10
- Ответ 11
- Ответ 12
- Ответ 13
- Ответ 14
- Ответ 15
- Ответ 16
- Ответ 17
- Ответ 18
- Ответ 19
- Нет, вам не нужно ничего делать с AndroidManifest.xml
- Ответ 20
- Ответ 21
- Ответ 22
List of Android version names
Android versions up to Android 10! 10 got, additionally to their nummeric version number, a code-name, which was assigned by Google. Like the naming of Ubuntu versions (names of animals with an adjective [1] ), Android version names were names of, mostly american, sweets, where the first letter was in alphabetical order.
The assignment of numeric and textual version names are not always consistent. Android 4.0 and Android 4.1, for example, have different version names, but Android 5.0, 5.1 and 5.1.1 share the same version name.
Starting with Android 10! 10, Android versions do not get a codename anymore. Since then, the Android versions will be released with their version number only. [2] [3] [4] [5]
Содержание
Cupcake
The Android version 1500! 1.5 Cupcake is the first version, which got a name assigned, which is Cupcake. Cupcakes are muffin-like cakes, which mostly has a creamy hood.
Donut
Version 1600! 1.6 Donut was given the name Donut.
Eclair
Android-Version 2000! 2 Eclair and 2100! 2.1 Eclair share the same name, Eclair. Eclairs are longly biscuits overdrawn with chocolate.
Froyo
Frozen Yogurt is a ice-like dessert made with milk and yogurt and is also the name of the Android version 2200! 2.2 Froyo.
Gingerbread
The name of Android version 2300! 2.3 «Gingerbread» is Gingerbread, which are cake-like biscuits mostly eaten around christmas time.
Honeycomb
The android version mostly made for tablets, Android 3000! 3.0 Honeycomb, is called Honeycomb. The bootanimation of this android version is also made like a honeycomb.
Ice Cream Sandwich
Android 4.0 is called after a sweet, which is made of delicious ice cream bewtween two biscuits: an Ice Cream Sandwhich.
Jelly Bean
Jelly beans are colorful, mostly made out of sugar, sweets, which have a hard shell and are filled with jelly. The following android versions share this name:
KitKat
KitKat is a brand from Nestle, and is a chocolate bar filled with waffles. Android 4.4 is named after this sweet: 4.4! 4.4 «KitKat».
Lollipop
Lollipops are sweets in different flavors on a stalk and is also the name of the following android versions:
Marshmallow
The android version 6.0, announced at 17th of august in 2015 is called after the sweet Marshmallow.
Nougat
Android 7, also called Android N, officialy got the name Nougat.
Android 8, also called Android O, carries the name Oreo, which are two crispy chocolate cookies with a vanilla cream center.
Android 9, also called Android Pie, carries the name Pie, which is the name of different sweet dishes.
The version 9! 9 was the last Android version which got a codename assigned.
Android 10
Google announced that a new Android Version will be officially known as Android 10.
Источник
Tek Eye
The table in this article lists all the different versions of Android, starting with the earliest Application Programming Interface (API) level to the latest API level. Thus the list is from the oldest Android versions to the latest.
Android Versions by Name, Number, Availability and API Level
Each version of Android is given a code name. The code name is traditionally the name of a dessert, cake or sweet, e.g, Gingerbread, Froyo, Jelly Bean, etc. — as the sugar laden picture below shows. The table that follows lists the code names, version numbers, first release date and Application Programming Interface (API) versions, along with the equivalent Software Development Kit (SDK) constants (Build.VERSION_CODES). The Android version number on a device is normally found in the settings. Select Settings, then About Phone or About Device and look at the Firmware Version or Android Version entry.
List of Android Versions and Their Names, API Level and Dates
Name | Version | Available | API | VERSION_CODES |
---|---|---|---|---|
N/A | 1.0 | October 2008 | 1 | BASE |
N/A | 1.1 | February 2009 | 2 | BASE_1_1 |
Cupcake | 1.5 | May 2009 | 3 | CUPCAKE |
Donut | 1.6 | September 2009 | 4 | DONUT |
Eclair | 2.0 | November 2009 | 5 | ECLAIR |
Eclair | 2.0.1 | December 2009 | 6 | ECLAIR_0_1 |
Eclair | 2.1 | January 2010 | 7 | ECLAIR_MR1 |
Froyo | 2.2 to 2.2.3 | June 2010 | 8 | FROYO |
Gingerbread | 2.3 to 2.3.2 | November 2010 | 9 | GINGERBREAD |
Gingerbread | 2.3.3 to 2.3.7 | February 2011 | 10 | GINGERBREAD_MR1 |
Honeycomb | 3.0 | February 2011 | 11 | HONEYCOMB |
Honeycomb | 3.1 | May 2011 | 12 | HONEYCOMB_MR1 |
Honeycomb | 3.2 to 3.2.6 | June 2011 | 13 | HONEYCOMB_MR2 |
Ice Cream Sandwich | 4.0.1 to 4.0.2 | October 2011 | 14 | ICE_CREAM_SANDWICH |
Ice Cream Sandwich | 4.0.3 to 4.0.4 | December 2011 | 15 | ICE_CREAM_SANDWICH_MR1 |
Jelly Bean | 4.1 to 4.1.1 | July 2012 | 16 | JELLY_BEAN |
Jelly Bean | 4.2 to 4.2.2 | November 2012 | 17 | JELLY_BEAN_MR1 |
Jelly Bean | 4.3 | July 2013 | 18 | JELLY_BEAN_MR2 |
Kit Kat | 4.4 to 4.4.4 | October 2013 | 19 | KITKAT |
Kit Kat | 4.4W to 4.4W.2 | June 2014 | 20 | KITKAT_WATCH |
Lollipop | 5.0 to 5.0.2 | November 2014 | 21 | LOLLIPOP |
Lollipop | 5.1 to 5.1.1 | March 2015 | 22 | LOLLIPOP_MR1 |
Marshmallow | 6.0 to 6.0.1 | October 2015 | 23 | M |
Nougat | 7.0 | August 2016 | 24 | N |
Nougat | 7.1 to 7.1.2 | October 2016 | 25 | N_MR1 |
Oreo | 8.0.0 | August 2017 | 26 | O |
Oreo | 8.1.0 | December 2017 | 27 | O_MR1 |
The above table was derived from the following sources (note that some release dates are derived from the Android developers documentation, the actual SDK availability may have been a little earlier, see the Wikipedia article):
When programming an App the API level is used to determine whether specific Android features are present or not. The API level can be read in versions prior to Donut (Cupcake, 1.1 and 1.0) using:
int APILevel = Integer.parseInt(Build.VERSION.SDK);
And from Donut onwards using:
int APILevel = Build.VERSION.SDK_INT;
(Build.VERSION.SDK is deprecated, i.e. it will be removed from the API at some future release).
When using functionality from a later API, but the App needs to support earlier Android versions, wrap the newer functionality in a separate class. Then check the API level before instantiating the class to prevent a VerifyError exception from occurring. See the article Support Multiple API Versions in Android.
Author: Daniel S. Fowler Published: 2012-05-25 Updated: 2017-01-08
Do you have a question or comment about this article?
(Alternatively, use the email address at the bottom of the web page.)
↓markdown↓ CMS is fast and simple. Build websites quickly and publish easily. For beginner to expert.
Free Android Projects and Samples:
Источник
How to get the versionCode and versionName of your app
EnvyAndroid
Read more posts by this author.
EnvyAndroid
In you AndroidManifest.xml file, you can specify the values of android:versionCode and android:versionName .
versionCode
The versionCode is integer value used to easily differentiate between app versions.
App developers must increment this value when they release updates to their apps in Android Market, so it can determine if users are using an old version of the app, and offer them to update it.
versionName
The versionName is a string containing a regular “release version” as seen in other desktop applications, such as “1.4.5” or “3.7”.
The versionName is just a “human readable” version code.
Accessing it
Here is how you can access these values in your application code:
This way, you can check which version of your app is being used, if you need to do something spesific with that information. Or you can make a small method that checks for new updates to the app.
You can also access other useful resources this way, for example: packageName and requestedPermissions.
More on android app versioning here, and AndroidManifest i explained in depth here.
Источник
Как получить номер сборки/версии вашего приложения для Android?
Мне нужно выяснить, как получить или сделать номер сборки для моего приложения Android. Мне нужно, чтобы номер сборки отображался в пользовательском интерфейсе.
Нужно ли что-то делать с AndroidManifest.xml ?
ОТВЕТЫ
Ответ 1
И вы можете получить код версии с помощью этого
Ответ 2
Если вы используете плагин Gradle/Android Studio, от версии 0.7.0, код версии и имя версии доступны статически в BuildConfig , Убедитесь, что вы импортируете пакет приложений, а не другой BuildConfig :
Не требуется контекстный объект!
Также не забудьте указать их в файле build.gradle вместо AndroidManifest.xml .
Ответ 3
Немного короче, если вам просто нужно имя версии.
Ответ 4
Есть две части, которые вам нужны: Android: версия Код Android: версия Имя
versionCode — это число, и каждая версия приложения, которую вы отправляете в Маркет, должна иметь больший номер, чем последняя.
VersionName — это строка, которая может быть любой, какой вы хотите. Здесь вы определяете свое приложение как «1.0», «2.5» или «2 Alpha EXTREME!» или что угодно.
Ответ 5
Использование Gradle и BuildConfig
Получение VERSION_NAME из BuildConfig
Да, теперь это легко.
Возвращает ли пустая строка для VERSION_NAME?
Если вы получаете пустую строку для BuildConfig.VERSION_NAME , то читайте дальше.
Я продолжал получать пустую строку для BuildConfig.VERSION_NAME , потому что я не устанавливал versionName в файле сборки Grade (я перенес из ANT в Gradle). Итак, вот инструкции по обеспечению установки VERSION_NAME с помощью Gradle.
build.gradle
Примечание: это от мастерски Jake Wharton.
Удаление versionName и versionCode из AndroidManifest.xml
И поскольку теперь вы установили versionName и versionCode в файл build.gradle , вы также можете удалить их из своего файла AndroidManifest.xml , если они есть.
Ответ 6
Я не вижу необходимости получать его от менеджера пакетов
Ответ 7
Вот чистое решение, основанное на решении scottyab (отредактированное Xavi). Он показывает, как сначала получить контекст, если он не предоставлен вашим методом. Кроме того, он использует несколько строк вместо вызова нескольких методов на строку. Это облегчает вам задачу отладки вашего приложения.
Теперь, когда вы получили имя версии в String myVersionName , вы можете установить его в TextView или все, что вам нравится.
Ответ 8
Используйте класс BuildConfig
Ответ 9
Если вы используете PhoneGap, создайте собственный плагин PhoneGap:
Создайте новый класс в своем приложении:
В plugins.xml добавьте следующую строку:
В deviceready event добавьте следующий код:
Затем вы можете получить атрибут versionName, выполнив:
Ответ 10
Очень простой способ:
Ответ 11
Вот простой способ получить название версии и код версии
Ответ 12
Для пользователей xamarin используйте этот код, чтобы получить имя и код версии
1) Название версии:
Ответ 13
Получить код сборки, который используется для идентификации apk по его коду версии. Код версии используется для определения фактической конфигурации сборки во время обновления базы данных, публикации и т.д.
int versionCode = BuildConfig.VERSION_CODE;
Имя версии используется для ознакомления пользователей с разработчиками последовательности Developmemt. Вы можете добавить любое название версии по своему желанию.
String versionName = BuildConfig.VERSION_NAME;
Ответ 14
Если вы хотите использовать его в xml, добавьте строку ниже в файл gradle:
И затем используйте его на вашем xml следующим образом:
Ответ 15
Всегда делайте это с блоком try catch :
Ответ 16
Вот способ получения кода версии:
Ответ 17
У меня есть SOLVE this, используя класс предпочтений.
Ответ 18
Есть несколько способов получить versionCode и versionName программно.
- Получить версию из PackageManager . Это лучший способ для большинства случаев.
- Получите его из сгенерированного BuildConfig.java . Но обратите внимание, что если вы получите доступ к этим значениям в библиотеке, она вернет версию библиотеки, а не приложения, использующие эту библиотеку. Так что используйте только в небиблиотечных проектах!
Есть некоторые детали, кроме использования второго способа в проекте библиотеки. В новом плагине Android Gradle (3.0. 0+) некоторые функциональные возможности удалены. Итак, на данный момент, т.е. установка разных версий для разных вкусов работает некорректно.
Код выше будет правильно установить значение в BuildConfig , но от PackageManager вы получите 0 и null , если вы не установили версию в по default конфигурации. Таким образом, ваше приложение будет иметь код 0 версии на устройстве.
Существует обходной путь — установите версию для выходного файла apk вручную:
Ответ 19
Нет, вам не нужно ничего делать с AndroidManifest.xml
Как правило, название и код версии вашего приложения находятся в файле gradle уровня приложения под тегом defaultConfig:
Примечание. Если вы хотите загрузить приложение в PlayStore, можно указать любое имя в качестве имени версии, но код версии должен отличаться от кода текущей версии, если это приложение уже находится в Play Store.
Просто используйте следующий фрагмент кода, чтобы получить код версии и название версии из любой точки вашего приложения:
Ответ 20
для Api 28 PackageInfo.versionCode устарел, поэтому используйте следующий код:
Ответ 21
Этот код упоминался выше, но здесь он снова включен. Вам нужен блок try/catch, потому что он может вызывать «NameNotFoundException».
Надеюсь, это упростит для кого-то дорогу.:)
Ответ 22
Кому-то, кому нужна информация о BuildConfig для пользовательского интерфейса приложения, однако, хочет использовать эту информацию для настройки конфигурации задания CI или других, таких как я.
В вашем каталоге проектов автоматически создается файл BuildConfig.java, пока вы успешно строите проект.
Разделите информацию, необходимую для python script или других инструментов. Вот пример:
Пожалуйста, извините мои ограниченные возможности английского языка, но надеюсь, что это поможет.
Источник