Troubleshooting Android Studio

Lost keystore

If you use the same keystore when updating AndroidAPS you do not have to uninstall the previous version on your smartphone. That’s why it is recommended to store the keystore in a save place.

In case you cannot find your old keystore anymore, proceed as follows:

  1. Export settings on your phone.
  2. Copy settings from your phone to an external location (i.e. your computer, cloud storage service...).
  3. Make sure settings file “AndroidAPS Preferences” is stored safely.
  4. Generate signed apk of new version as described on the update page.
  5. Uninstall previous AAPS version on your phone.
  6. Install new AAPS version on your phone.
  7. Import settings - if you can’t find them on your phone copy them from the external storage.
  8. Keep on looping.

Предупреждение компилятора Kotlin

Если сборка завершена успешно, но вы получаете предупреждения компилятора Kotlin, просто проигнорируйте эти предупреждения.

Приложение успешно построено и может быть перенесено на телефон.

ignore Kotline compiler warning

Key was created with errors

When creating a new keystore for building the signed APK, on Windows the following error message might appear

Key was created with errors

This seems to be a bug with Android Studio 3.5.1 and its shipped Java environment in Windows. The key is created correctly but a recommendation is falsely displayed as an error. This can currently be ignored.

Не удалось загрузить… / Работа оффлайн

Если вы получите подобное сообщение об ошибке

Warning could not download

убедитесь, что ‘Автономная работа’ выключена.

Файл -> параметры

Settings offline work

Ошибка: buildOutput.apkData не может быть пустым

Иногда появляется сообщение об ошибке при компоновке apk

Errors while building APK.

Cause: buildOutput.apkData must not be null

This is a known bug in Android Studio 3.5 and will probably not be fixed before Android Studio 3.6. Three options:

  1. Вручную удалите три папки компоновки (обычная “сборка”, папка компоновки в “app” и папка компоновки в “wear”) и снова сгенерируйте подписанный apk.
  2. Set destination folder to project folder instead of app folder as described in this video.
  3. Измените папку назначения apk (другое расположение).

Unable to start daemon process

If you see an error message like the one below you probably use a Windows 10 32-bit system. This is not supported by Android Studio 3.5.1 and above. I you are using Windows 10 you must use a 64-bit operating system.

There are a lot of manuals on the internet how to determine wether you have a 32-bit or 64-bit OS - i.e. this one.

Screenshot Unable to start daemon process

No CGM data

Неодобренные изменения

Если вы получите сообщение об ошибке, как это

Failure uncommitted changes

Option 1 - Check git installation

  • git might be not installed correctly (must be globally available)
  • when on Windows and git was just installed, you should restart your computer or at least log out and re-login once, to make git globally available after the installation
  • Check git installation
  • If no git version is shown in check but git is installed on your computer, make sure Android Studio knows where git is located on your computer.

Option 2 - Reload source code

  • In Android Studio select VCS -> GIT -> Reset HEAD
Reset HEAD

Option 3 - Check for updates

  • Copy ‘git checkout –’ to clipboard (without quote signs)

  • Switch to Terminal in Android Studio (lower left side of Android Studio window)

    ../../../_images/GIT_TerminalCheckOut111.PNG
    alt:Android Studio Terminal
  • Paste copied text and press return

    GIT checkout success

Приложение не установлено

phone app note installed
  • Make sure you have transferred the “app-full-release.apk” file to your phone.
  • If “App not installed” is displayed on your phone follow these steps:
  1. Export settings (in AAPS version already installed on your phone)
  2. Удалите AAPS с телефона.
  3. Enable airplane mode & turn off bluetooth.
  4. Установите новую версию («app-full-release.apk»)
  5. Import settings
  6. Снова включите Bluetooth и отключите режим самолета

Приложение установлено, но старая версия

If you build the app successfully, transferred it to your phone and installed it successfully but the version number stays the same then you might have missed to update your local copy <../Update-to-new-version.html#update-your-local-copy>.

Ничего из вышеперечисленного не сработало

Если вышеперечисленные советы не помогли попробуйте начать сборку приложения с нуля:

  1. Export settings (in AAPS version already installed on your phone)
  2. Have your key password and key store password ready
    In case you have forgotten passwords you can try to find them in project files as described here. Or you just use a new keystore.
  3. Build app from scratch as described here.
  4. Когда вы успешно собрали APK, удалите существующее приложение с телефона, перенесите новое приложение на ваш телефон и установите.
  5. Import settings

Сценарий худшего варианта

Если даже создание приложения с нуля не решает проблему, попробуйте полностью удалить Android Studio. Некоторые пользователи сообщили, что это решило проблему.

Make sure to uninstall all files associated with Android Studio. If you do not completely remove Android Studio with all hidden files, uninstalling may cause new problems instead of solving your existing one(s). Manuals for complete uninstall can be found online i.e. https://stackoverflow.com/questions/39953495/how-to-completely-uninstall-android-studio-from-windowsv10.

Install Android Studio from scratch as described here and do not update gradle.