Проблемы при сборке Ionic 2 приложения для Android и их решение

· автор BaRoN · На чтение уйдёт 2 минуты · (302 слова)

Замечательная проблема сегодня передо мной встала. Ругается на меня ionic, зараза такая, нехорошими словами на басурманском языке. А с виду-то всё вроде бы в порядке, вот ещё совсем-совсем недавно на том самом компьютере собирал Мордовский разговорник (кстати, кому не жалко, поставьте пятёрочку: https://play.google.com/store/apps/details?id=com.bytexgames.mordov). А тут — такая подстава. Вылезает вот такое сообщение:

A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
  [Android SDK Platform 25].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
  Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

Или же даже вот такое:

A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
  [SDK Patch Applier v4, Google Repository, Android Support Repository].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
  Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

А знаете, в чём дело? Дело в том, что раньше я собирал под более старый Android SDK, 23 версии, и принял его лицензию. А 25 SDK у меня просто вообще нет. Вот кто их научил писать такие “понятные” тексты ошибок?

Кстати, потом вылезло ещё:

Execution failed for task ':processDebugGoogleServices'.
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0.

Но это уже решается просто: оказалось, что два разных плагина для push не ужились между собой. Оставил только Firebase, я вообще последние два дня в него влюблённый.

Полезное