- Компиляция пустого проекта Qt Android
- Subscribers
- Qt android
- Building the android package failed
- Building the android package failed
- How to Fix “Failed to install the following Android SDK packages as some licenses have not been accepted” Error in Android Studio?
- What are Android SDK packages?
- How To Solve Failed to install the following Android SDK packages?
- Method 1
- Method 2
- Method 3
- Method 4
- Method 5
Компиляция пустого проекта Qt Android
Делаю пустой проект, пытаюсь компилировать.
Выдаёт сообщение об ошибке.
Ругается так (начиная с 19 строчки подсвечивает красным)
Встретил мнение что надо Use NDK 19c and Android SDK build-tools 28.0.3 (delete 29.0.0 and any other versions), пробую в эту сторону.
Когда в Android Studio удаляю последние версии и устанавливаю 19с и 28 то в Qt Tools->Options->Devices->Android появляется ошибка в настройках SDK, красный крестик напротив All essential packages installed for all installed Qt versions
и не даёт компилировать. а так же предлагает обновить. после обновления компиляция происходит с предыдущей ошибкой.
We recommend hosting TIMEWEB
Subscribers
К сожалению есть такая беда, что от версии к версии перестаёт работать сборка и иногда отктывают Qt Creator или сам Qt к более старой версии.
Встретил мнение что надо Use NDK 19c and Android SDK build-tools 28.0.3 (delete 29.0.0 and any other versions), пробую в эту сторону.
Чтобы это сработало, стоит ещё и сам Qt откатить.
А вы устанавливали комплект разработки java jdk 1.8? Если нет, то в том ещё может быть проблема.
Чтобы это сработало, стоит ещё и сам Qt откатить.
Пробую играть с версиями. Если не поможет попробую поставить на линукс на виртуальную машину.
А вы устанавливали комплект разработки java jdk 1.8?
Да, уже поставил её, вчера, пока разбирался. Где-то прочитал про эту особенность.
Надеюсь потом не окажется что я просто делаю какую-то глупую ошибку в самом начале.
Источник
Qt android
Доброй ночи. Собственно проблема с установкой на эмулятор(до устройства еще не добрался). При установке, консоль говорит о:
Поставил ant, появились другие проблемы
Русские буквы — зло в любых системах.
For more information, run this command with —verbose
Стоит прислушаться к совету.
Подозреваю, что ant debug .
Установи ant в пакетном менеджере.
Была такая же проблема, просто прописал в Qt Creator /usr/bin/ant путь и заработало. Вкладка Android в настройках, «Программа Ant».
Спасибо, но не то.
Установки SDK в нормальный каталог (без кириллицы).
Да, да, спасибо. Это мне вчера и помогло, я еще не успел отписаться.
Нужно еще подробнее смотреть логи, я помню что с какой-то версией SDK был баг при сборке. В гугле нашел решение. Советую сделать export LANG=C в консоль и полученные логи на инглише в гугл засунуть.
Источник
Building the android package failed
I have recently installed Qt. I was following this tutorial, how to deploy on android https://www.youtube.com/watch?v=_nkhlhBwkjk.
I tried to deploy default program on my Xperia L. Qt Creator found my device, build without problems, but deployment failed.
@23:55:44: Prováděn postup pro projekt aaa.
23:55:44: Nastavení nezměněno. Přeskakuje se krok qmake.
23:55:44: Spouští se: «C:\Qt\Tools\mingw482_32\bin\mingw32-make.exe»
mingw32-make: Nothing to be done for ‘first’.
23:55:45: Proces «C:\Qt\Tools\mingw482_32\bin\mingw32-make.exe» byl ukončen obvyklým způsobem.
23:55:45: Odstraňuje se adresář C:\Users\Sony\Desktop\Programing\a\build\android-build
23:55:46: Spouští se: «C:\Qt\Tools\mingw482_32\bin\mingw32-make.exe» INSTALL_ROOT=»C:\\Users\\Sony\\Desktop\\Programing\\a\\build\\android-build» install
copy /y «libaaa.so» «C:\Users\Sony\Desktop\Programing\a\build\android-build\libs\armeabi-v7a\libaaa.so»
1 file(s) copied.
23:55:46: Proces «C:\Qt\Tools\mingw482_32\bin\mingw32-make.exe» byl ukončen obvyklým způsobem.
23:55:46: Spouští se: «C:\Qt\5.3\android_armv7\bin\androiddeployqt.exe» —input C:/Users/Sony/Desktop/Programing/a/build/android-libaaa.so-deployment-settings.json —output C:/Users/Sony/Desktop/Programing/a/build/android-build —deployment bundled —install —ant C:/Android/Apache/apache-ant-1.9.4/bin/ant.bat —android-platform android-17 —jdk «C:/Program Files (x86)/Java/jdk1.8.0_05» —device ZH8000DGQL
23:55:46: Nahrávají se soubory nezbytné pro ladění.
23:55:46: Nasazení balíčku: Spouští se příkaz ‘C:/Android/AndroidSDK/SDK/sdk/platform-tools/adb.exe -s ZH8000DGQL pull /system/bin/app_process C:/Users/Sony/Desktop/Programing/a/build/app_process’.
23:55:46: Nasazení balíčku: Spouští se příkaz ‘C:/Android/AndroidSDK/SDK/sdk/platform-tools/adb.exe -s ZH8000DGQL pull /system/lib/libc.so C:/Users/Sony/Desktop/Programing/a/build/libc.so’.
BUILD FAILED
C:\Android\AndroidSDK\SDK\sdk\tools\ant\build.xml:483: The SDK Build Tools revision (19.0.3) is too low for project ‘QtApp’. Minimum required is 19.1.0
Total time: 0 seconds
Generating Android Package
Input file: C:/Users/Sony/Desktop/Programing/a/build/android-libaaa.so-deployment-settings.json
Output directory: C:/Users/Sony/Desktop/Programing/a/build/android-build
Application binary: C:/Users/Sony/Desktop/Programing/a/build/libaaa.so
Android build platform: android-17
Install to device: ZH8000DGQL
Unable to locate tools.jar. Expected to find it in C:\Program Files (x86)\Java\jre8\lib\tools.jar
Buildfile: C:\Users\Sony\Desktop\Programing\a\build\android-build\build.xml
-check-env:
[checkenv] Android SDK Tools Revision 23.0.2
[checkenv] Installed at C:\Android\AndroidSDK\SDK\sdk
-setup:
[echo] Project Name: QtApp
[gettype] Project Type: Application
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.3
Building the android package failed!
— For more information, run this command with —verbose.
23:55:51: Proces «C:\Qt\5.3\android_armv7\bin\androiddeployqt.exe» byl ukončen. Vrácená hodnota 14.
Chyba při sestavování/nasazování projektu aaa (sada: Android pro armeabi-v7a (GCC 4.8, Qt 5.3.1))
Při provádění kroku ‘Poslat na zařízení Android’
23:55:51: Uplynulý čas: 00:07.@
bq. BUILD FAILED
C:\Android\AndroidSDK\SDK\sdk\tools\ant\build.xml:483: The SDK Build Tools revision (19.0.3) is too low for project ‘QtApp’. Minimum required is 19.1.0
Try to update you Android SDK Build tools to version 19.1 via Android SDK Manager.
I had wrong JAVA_HOME path, not it’s working :-).
Источник
Building the android package failed
Hi, I’m using Qt 5.14, SDK 26.1.1 and NDK 20.1
when I build project (default project) everything is okay but when I run it I get this error
@no_1imit Which exact Qt version do you use? There are ARM and x86 Android versions.
As most android devices are arm based, that is most likely the issue here
ARM
@no_1imit As @J-Hilk pointed out you’re using x86 (see the log you posted) which is not going to work on ARM.
@J-Hilk I was testing kits but I still have problem with ARM (default detected)
there is the error
@no_1imit You really should rename your Kit as «Android for armeabi-v7a,arm64-v8a,x86,x86_64» is simply confusing as a Kit can’t be for both ARM and x86 at the same time!
Can you post screenshot of your «Qt 5.14.0 for Android» from «Qt Versions» tab?
@no_1imit You really should rename your Kit as «Android for armeabi-v7a,arm64-v8a,x86,x86_64» is simply confusing as a Kit can’t be for both ARM and x86 at the same time!
Can you post screenshot of your «Qt 5.14.0 for Android» from «Qt Versions» tab?
Actually, I’m not so sure about that anymore.
I haven’t updated jet, but shouldn’t the 5.14 update bring the unified AAB package support for android? That could reduce everything to one precompiled kit, if properly set up!?
@J-Hilk Oh, I remember reading something about it now. Yes, could be.
@no_1imit @jsulm @J-Hilk The last Qt for Android Kit is multi-platform, but you have to choose the active platform in «Projects».
sorry I’m beginner. do you mean this page?
Источник
How to Fix “Failed to install the following Android SDK packages as some licenses have not been accepted” Error in Android Studio?
When you download the latest Android SDK tools version using the command line to install SDKs and you just try to build gradle then this error shows up:
You may face this error even after typing y as the answer for the question: Do you accept the license ‘android-sdk-license-c81a61d9’ [y/n]: y. So we need to look at why this error is popping up? Because of this error, we cannot compile our project. So In this article, we will talk about how to solve this error using five different methods. But before directly jumping to solutions first let’s see something about Android SDK.
What are Android SDK packages?
SDK stands for software development kit or devkit for short. The Android SDK consists of an emulator, development tools, sample projects with source code, and the required libraries to build Android applications. The Android SDK Manager, manages various Android SDK versions, tools, and various other useful packages that you can select and download, to keep your development environment up-to-date.
How To Solve Failed to install the following Android SDK packages?
Method 1
You need to accept the licenses before building. According to Android SDK docs, you can use the following command depending on the SDK manager location: Docs on –licenses option seems to be missing though. yes | sdkmanager –licenses
Windows:
Step 1: Navigate to %ANDROID_HOME%/tools/bin .
%ANDROID_HOME% is the path to SDK. By default it is located at : C:\Users\UserName\AppData\Local\android\Sdk . If you have moved SDK to another directory location then you can follow below steps :
- Search for edit the system environment variables.
- Then in the environment variables, you will see ANDROID_HOME.
- Navigate to that path in cmd
Step 2:
After successfully navigating just type below command and you are done.
GNU/Linux Distributions:
macOS:
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
Flutter Users:
Just type flutter doctor –android-licenses in the terminal and wait for few seconds. You will see “All SDK package licenses accepted” on your screen.
Method 2
Step 1: In Android Studio go to Tools > SDK Manager.
Step 2: Go to the SDK Tools tab as shown in the below image.
Step 3: Select the Android SDK Command-line Tools (latest) and download by pressing Apply.
Method 3
in Windows OS go to your sdkmanager path then execute
You can find your sdkmanager at: \Android\tools\bin
IF you don’t know where is your SDK located, then follow these steps:
- Open Android Studio
- Navigate to Your Project > Files > Setting > Appearance and Behavior > Android SDK
Method 4
Step 1:Go to your $ANDROID_HOME/tools/bin and fire the cmd and type the below command:
Accept All licenses listed there.
Step 2:
After this just go to the licenses folder in SDK.
Check that it’s having these five files:
- android-sdk-license
- android-googletv-license
- android-sdk-preview-license
- google-gdk-license
- mips-android-sysimage-license
Step 3:
Give a retry and build again, still, Jenkins giving ‘licenses not accepted” then you have to give full permission to your ‘SDK’ directory and all its parent directories. Here is the command:
If you having sdk in /opt/ directory.
Method 5
For Windows users:
Step 1: Go to the location of your sdkmanager.bat file. By default, it is at Android\sdk\tools\bin inside the %LOCALAPPDATA% folder.
Step 2: Open a terminal window there by typing cmd into the title bar. Then go to the above path(Android\sdk\tools\bin as highlighted by the white line in the below image) and type :
Источник