Rad studio xe7 андроид

Creating an Android Emulator

An Android emulator is an Android Virtual Device (AVD) that represents a specific Android device. You can use an Android emulator as a target platform to run and test your Android applications on your PC.

Caution: Android emulators are extremely slow and do not support the same feature set as real devices.
We do not recommend that you attempt to use an Android emulator:

  • If you have an Android device, use your Android device instead.
  • You can also use Mobile Preview to do initial debugging of an Android app.

Minimum Requirements for an Android Emulator

To create an Android emulator (made available by Google as part of the Android SDK), we recommend using at least the following:

  • Intel Core i5 CPU
  • 4GB of RAM
  • GPU emulation must be listed in the hardware list of the emulator image, as explained in Running Your Android Application on an Android Emulator.

We do not recommend using an Android emulator on a virtual machine (VM), because GPU support for the emulator is generally not available on VMs. However, if you are running Delphi on a VM on a Mac OS X computer, you can consider using a remote emulator on the Mac, given that the emulator does not work on VMs. For more information, see http://delphi.org/2013/09/debugging-against-a-remote-android-emulator/.

RAD Studio supports the emulator for Android versions 4.x.
We do not support emulators for the 2.x version (Gingerbread) because emulators for Android versions 2.x target an ARMv6 CPU, which Delphi does not support.

Android Emulators Require a Separate GPU

Android emulators are heavily hardware-dependent, and this includes the hardware being emulated as well as the hardware on which the emulator runs.

For this reason, we recommend that you verify the presence of a suitable graphics card on your development system.

  1. Open Control Panel\Appearance and Personalization\Display\Screen Resolution.
  2. Click Advanced Settings.
  3. Take a look at the displayed properties of your graphics card.
    • If you do not have a suitable GPU, it is probably not worth your time to create and attempt to run an Android emulator. Find another development system that does have a suitable GPU.
    • We do not recommend Intel GPUs.
    • If you receive error messages about OpenGL ES when you try to run your Android emulator, this means that your GPU is probably not suitable.

Creating an Android Emulator Is Optional

If you decide to create your own Android emulator, consider creating an emulator for each Android device you want to support. Keep in mind that Android emulators often run so slow that some people consider them unusable.

Читайте также:  White russia crmp андроид

RAD Studio supports the following targets:

  • Android emulators that are version 4.0 or newer
  • Android devices that are ARM version 7 or newer

Android emulators cannot be run on a Virtual Machine (VM). Although an emulator might run on a VM, the emulator will not actually run an application.

Note: It is a well-known performance issue that Android emulators are extremely slow.

Installing an Android System Image (Required)

Before you create an Android emulator, you need to install an Android system image that your emulators can use.

Note: If you installed the Android SDK and NDK during RAD Studio installation, a valid Android system image (such as Android 4.2.2 API 17) should already be shown as Installed in the Android SDK Manager. In this case, you do not need to install another Android system image.

Follow these steps:

  1. Start the Android Virtual Device Manager (select Start > All Programs > Embarcadero RAD Studio XE6 > Android SDKs > Android AVD Manager ).
  2. In the packages tree, locate and check the ARM EABI v7a System Image node within the first Android node in the list. For example: Android 4.2.2 (API 17) or Android 4.3 (API 18)
  3. Click Install 1 package. (Clear any checkboxes that were auto-selected.)
  4. In the Choose Packages to Install page, click Accept License, and then click Install to install the system image.

Creating an Android Emulator Using the Android Virtual Device Manager

To create an Android emulator on your system, follow these steps:

    Start the Android SDK Manager (select Start > All Programs > Embarcadero RAD Studio XE6 > Android SDKs > Android AVD Manager ).

In the Android Virtual Device Manager, click the New button to create a new virtual device.

  • In the Create new Android Virtual Device (AVD) dialog box, select an Android device to emulate, and enter the details describing the Android device you want to emulate. In order to run a FireMonkey mobile application, your Android emulator must meet the following requirements:
    1. In Target, select an Android SDK with an API level that is 17 or higher. The drop-down list contains your installed versions of the Android SDK.
    2. Under Emulation Options, check Use Host GPU.
    3. In Device, select the Android device to emulate.

    Tip: Emulating an older Android device like the Nexus S might be faster than emulating a newer, larger device like the Nexus 10.

  • Click OK twice to create your new Android emulator.
  • You can now view your emulator in the Android Virtual Device Manager.
  • RAD Studio lists your Android emulators in the Project Manager, within the Target node of the Android target platform node. See Using the Target Node.

    Note: As reference, here are the default installed locations of the Android development tools as installed by the RAD Studio installer:

    • If you need to start the Android SDK Manager directly, here is its location:
    Читайте также:  Заводские настройки андроид ксиоми как вернуть

    C:\Users\Public\Documents\Embarcadero\Studio\14.0\PlatformSDKs\adt-bundle-windows-x86-20131030

    • If SDK Manager.exe does not start, use Android.bat, which is located here:

    C:\Users\Public\Documents\Embarcadero\Studio\14.0\PlatformSDKs\adt-bundle-windows-x86-20131030\sdk

    Creating an Android Emulator Using the Command Line

    You can create an Android emulator in the command window by entering a command such as this:

    For the skin, you might want to add this option:

    Starting an Android Emulator

    When the emulator is the current target platform, you do not have to start the emulator before running your Android app on the emulator. However, we recommend that you start your Android emulator separately, perhaps before you start RAD Studio. Emulators are notoriously slow to start and to run, so starting the emulator beforehand means that your app can get to the emulator more quickly.

    The recommended way to start an Android emulator is by using the Android Virtual Device Manager, which can be started from the Android SDK Manager.

    To start an Android emulator such as the default emulator installed in RAD Studio:

    1. Start the Android Virtual Device Manager (select Start > All Programs > Embarcadero RAD Studio XE6 > Android SDKs > Android AVD Manager ).
    2. Select the emulator and click Start.

  • Then click Launch on the Launch Options dialog box.
  • Your emulator should now start (this might take five or ten minutes):

    In the Project Manager, your emulator should appear in the Target node of the Android target platform, with its assigned port (such as (5554)):

    Tip: If the Project Manager does not show your running Android emulator as running, with the same icon as in the screenshot above, see Using the Target Node.

    Your next step is to run an Android app on your emulator. In the Project Manager, ensure that the emulator’s name is in boldface and the port number is indicated in parentheses (such as (5554)), indicating that the emulator is running and is the current selected target platform.

    Источник

    Rad studio xe7 андроид

    Главная
    • О сайте
    • Карта сайта
    ИТ — специалист
    • *delphi*
      • Все статьи
    • *Сайтостроение*
      • Все статьи
      • HTML, CSS
      • Javascript, jQuery, иные скрипты
      • CMS (Joomla, Drupal..)
    • *Linux*
      • Заметки Linux
      • Консольные команды
      • Все статьи
    • *PHP*
      • Все статьи
        • Базы данных
        • Синтаксис
        • Графика
        • Файлы
        • Строки
        • Система
        • Функции
        • Безопасность
        • Поиск. Авторизация
        • Сеть. Почта
        • Сервисы, чаты, иное
    • *Админка под Win*
      • Заметки, статьи
    • *Sql (mysql,firebird)
      • Заметки, статьи
    • *фото-галерея статей
    Программы
    • Загрузки

    Как настроить Android и RAD Studio XE7

    — RAD Studio XE7 (самая последняя версия на момент написания статьи);

    — Три замечательных девайса:
    Samsung Galaxy Tab S 8.4 (SM-T700);
    Samsung Galaxy Tab S 10.5 (SM-T800);
    Samsung Galaxy Note Edge (SM-N915F).

    — Ещё понадобятся обычные USB-кабели. Можно использовать один и подключать девайсы поочередно, или использовать три USB-кабеля, но это по желанию.

    1. Установка RAD Studio XE7 + SDK и NDK.
    Буду использовать свой ноутбук с Windows 8 64x.
    В процессе установки RAD Studio XE7 я не трогаю галочки Android SDK и Android NDK. По умолчанию галочки стоят, после установки эти две библиотеки будут установлены и настроены автоматически.

    1.1. Настройка путей к SDK и NDK (этот пункт не обязательный).
    Если по каким-то причинам вы не устанавливали SDK и NDK в процессе установки RAD Studio, то выполняем их настройку самостоятельно.
    В RAD Studio заходим в меню Tools —> Options, там находим закладку «SDK Manager», далее самостоятельно проверяем и настраиваем пути к библиотекам.

    1.2. Обновление библиотеки SDK (не обязательно).
    В редких случаях может понадобится обновление библиотеки SDK. Для этого запускаем «Android SDK Manager» и нажимаем на кнопку «Install N packages…». Далее из интернета скачаются и установятся
    последние обновления.

    2. Активизация режима разработчика на Android-девайсе.
    Беру планшет в руки и захожу в его настройки, там нахожу пункт «Об устройстве».
    Далее нахожу «номер сборки» и нажимаю на него 7 раз подряд. После этого активизируется скрытый пункт «Параметры разработчика», захожу в него и ставлю флажок напротив пункта «Отладка USB».
    То же самое я повторяю для остальных своих девайсов.

    3. Установка драйверов на Android-девайсе.
    Для этого я поочерёдно подключаю каждый планшет через USB-кабель к моему ноутбуку.
    Далее захожу в «Диспетчер устройств» и убеждаюсь, что все драйверы установлены. В моём случае они установились автоматически. Если драйверы не установились автоматически, то необходимо зайти на сайт производителя вашего планшета, скачать и установить их самостоятельно. Убедитесь в том, чтобы в «Диспетчере устройств» все девайсы были определены.
    То же самое я повторяю для остальных своих устройств.

    4. Разрешение отладки USB.
    После установки драйверов необходимо полностью отключить Android-девайс от ПК, вытащив из него USB-кабель и подключив его повторно. Дождитесь, когда на самом Android-девайсе появится приглашение «Разрешить отладку USB», ниже поставьте галочку «Всегда разрешать этот компьютер» и нажмите «Да».

    5. Запуск RAD Studio.
    Только на этом этапе я запускаю RAD Studio.
    Создаю новый проект Multi-Device Application и в «Project Manager» двойным кликом активизирую платформу Android (она выделяется жирным шрифтом). Далее открываю плюсом список Target, если девайс не появится, то необходимо нажать правой кнопкой на Target и из выпадающего списка — на Refresh. Все три девайса у меня определились с первого раза.

    6. Запускаю своё приложение на Android-девайсе. Вот так всё просто 🙂

    Необходимо помнить, что совсем не обязательно каждый запуск своего приложения отлаживать на устройстве. Delphi позволяет сделать это быстро и комфортно. Всю логику можно отладить в среде Windows, а потом уже проверить, как приложение запустится на самом устройстве.

    Важно помнить, что мы создаём сразу кросс-платформенное приложение, поэтому все платформозависимые классы или конструкции следует выносить отдельно от основного кода.

    Источник

    Читайте также:  Рейтинг напоминалок для андроид
    Оцените статью