I am trying to build an android APK in Qt Creator 3.0.1 . I have properly given the configured Android SDK, NDK, Ant, Java Jdk. In Build Android APK step under Build there is a option to specify Android Build SDK i.e target SDK. I am currenty using API 21 but it i am not getting an option to specify it over there.
Plz Help how can i do that.
First you should select Tools > Options > Android to add paths to the Android NDK and SDK :
Also select the Automatically create kits for Android tool chains option.
For configuring deployment settings you should go to Projects > Build Android APK > Details Since Qt 5.4 along with QtCreator 3.3.0. To create an APK package, select the Bundle Qt libraries in APK option :
You can also select Create Templates to create the manifest file to set application settings like icon, name, ...
In previous versions of Qt and Qt Creator you should go to Projects->Run->Deploy.
I recommend you to use the latest version of Qt and Qt Creator for Android development and deployment.
What helped me - switch off antivirus. Why see below:
I've got the same error and reinstallation didn`t help.
Runnning manually 'android.bat list targets' from cmd gives proper list of targets.
After digging into QtCreator code I found the reason - magic code for get list of targets in qt:
void AndroidConfig::updateAvailableSdkPlatforms() const
{
QProcess proc;
proc.setProcessEnvironment(androidToolEnvironment().toProcessEnvironment());
proc.start(androidToolPath().toString(), QStringList() << QLatin1String("list") << QLatin1String("target")); // list avaialbe AVDs
if (!proc.waitForFinished(10000)) {
proc.terminate();
return;
}
As you can see if 'android.bat list target' cmd will not finish for 10 seconds qtcreator will just terminate the process.
In my case it was 15 secs befor it finishes due to antivirus checks - so switching off antivirus could help in your case.
No need to restart QtCreator just open Android section in options again and all targets should be loaded.
I 'love' Qt - it is always like this with it.
Related
I am learning CI/CD Workflows for Flutter apps, I have successfully set up the CI/CD for the flutter android app but it still shows the warning while submitting through CI/CD as follows:
This App Bundle contains native code, and you've not uploaded debug symbols. We recommend you upload a symbol file to make your crashes and ANRs easier to analyze and debug.
whereas it does not show any warning when I manually build the app and submit it to the play store.
1. Install the NDK (Side By Side)
In Android Studio, install the NDK to your Flutter Project by following these steps
From an open project, select Tools > Android > SDK Manager from the main menu.
Click the SDK Tools tab.
Check the box to Show Package Details and note the version number
Check the box next to NDK, CMake, and Android SDK Command-line Tools
Click Apply
Install NDK and CMake in Android SDK Manager
After the necessary files are installed, go to File > Project Structure > SDK and select the NDK version.
or add this line to your ./android/app/src/build.gradle file
android {
compileSdkVersion 30
ndkVersion "21.1.6352462" // << Add this line with your version of the NDK
...
}
See the NDK documentation here for more details on installing the NDK.
2. CodeMagic Build Settings
In your Project Set up on codemagic.io make sure you're building for release then try building your app again.
Under build settings make sure you're building for release and not debug
It's a partial answer. I took the solution from this answer and wrote a post-build script. The script, shared below, creates the required debug symbol zip that we can upload manually. I haven't automated the distribution step so I can't say what we need to do there.
#!/usr/bin/env sh
pushd build/app/intermediates/merged_native_libs/release/out/lib
zip -r $CM_EXPORT_DIR/aab-debug-symbols.zip *
popd
I am trying to test in app purchases in Unity 2019.2.0f1, and when I try to build the apk, I keep getting error: Unable to locate Android NDK even though I downloaded Android NDK r16b and changed the path in Edit --> Preferences --> External tools
I searched alot and tried to install more than one version of NDK, and also tried to add the path of NDK in Environment Variables in settings of My Computer but the error kept showing.
Can someone please tell me how to solve this problem ?
Thanks.
I had the same issue in Unity 2019.2.8f1 on mac. My solution is going to Edit --> Preferences --> External tools and uncheck "android NDK installed with Unity". Then add the specific NDK folder path in it. For me, it is
/Applications/Unity/Hub/Editor/2019.2.8f1/PlaybackEngines/AndroidPlayer/NDK/*android-ndk-r16b*
Interestingly, the automatic setup by unity is /Applications/Unity/Hub/Editor/2019.2.8f1/PlaybackEngines/AndroidPlayer/NDK/
which missed the specific folder name android-ndk-r16b. So I just add android-ndk-r16b at the end of the last folder path. Hope this helps.
If you are using Unity Hub, you can just check the box where it sais add android support, that downloads everything you need for android development automatically.
Open unity hub > click install > click drop down menu in target unity > add modules > open drop down in android build support > check all sdk ndk download > proceed
Same problem here. I made a upgrade to version 2019.2.9f1 and it works.
I tried downgrading Unity version, changing path of NDK file and using other NDK files but none of them solved the problem.
After all, built the game in Windows machine instead of Mac and it solved the problem for me.
during build android project in unity 2019 and other new version >>Go to build setting>> then go to Other setting>> then scroll down || then see configuration >> in configuration go to >> scripting backend select > mono rather then IL2CPP then select ARMV7 rather then ARM64 your problem definitely will be solved thank
sohaib kh
this description can work on << window>> moreover , In mac or other operating system You might be apply : ILC2PP : or : ARMV7 : or : X86 : your problem definitely will be solved
during build android project in unity 2019 and other new version >>Go to build setting>> then go to Other setting>> then scroll down || then see configuration >> in configuration go to >> scripting backend select > mono rather then IL2CPP then select ARMV7 rather then ARM64 your problem definitely will be solved thank
so I tried to download NDK from StandAlone SDK manager and it didn't have the option! then I went to google developers and read some guides and understood how to get it via android Studio
there was an NDK option in SDK manager -> SDK tools tab , I checked it and after applying it started downloading it, but for some reason after download, it fails to install it (tried 2 time it fails at end of unzipping process at like 100% :| ) ***Note: I have enough space available, 4gb on windows drive, 20gb on SDK drive
***Note2: I deleted the NDK bundle folder and its contents created by the failed install in my SDK folder
so I went to NDK Download
and downloaded the package from there , but I can't get it to work, gradle says "Error:NDK not configured.
Download it with SDK manager.)"
I tried adding the NDKfolder to PATH variable or adding NDK_HOME variable but still the same error
Update 1 : I added ANDROID_NDK_HOME variable now it says : Error:A problem occurred configuring project ':TMessagesProj'.
I had this issue of
Error:NDK not configured. Download it with SDK manager.)
But I solved my problem with this link: Add C and C++ to your Project
you can skip to the heading Download the NDK and Build Tools, but read everything for knowledge.
This error might be, your Android Studio is not able to find the NDK location.
So, try doing this: right click on your project in Android Studio,select "Open Module Settings", select SDK location tab, and provide SDK and NDK locations.
I recently downloaded latest version of Android Studio today. I configured and setup everything properly but when i create a new project and try to run and debug in the connected phone, it will show this error.
Error: Local path doesn't exists.
Also, i search for apk file but no apk was generated anywhere.
I am using Android Studio 1.0 built on December 5 2014.
SDK manager is also no starting from Android studio.
Please help.
I got the same problem since update to 1.0 version, the bug comes from an internal script which is supposed to finds the distribution of Java but isn't working correctly on 32-bit Windows systems (SDK Manager was also impossible to run) and it has been fixed in the 24.0.1 release of the SDK.
Solution :
In line 27 of tools/lib/find_java.bat has a problem:
find /i "x86" > NUL && set arch_ext=32 || set arch_ext=64
You must remove space after "arch_ext=32". Correct code is:
find /i "x86" > NUL && set arch_ext=32|| set arch_ext=64
You should be able to open SDK Manager by now, and update Android SDK Tools.
Read this possible duplicate
Android Studio - local path doesn't exist
As for the APK, it does not get generated unless you do it.
It is meant for release your project into android file format when you are ready to distribute it.
I took a screenshot for you to see:
If you are using studio on Windows and your windows username contains special symbols like '&' - RENAME YOUR USERNAME (and user folder)!
My Issue has been resolved by following answer here https://www.reddit.com/r/androiddev/comments/2pfm2e/android_studio_local_path_doesnt_exist/ .
Please find the main points as follows.
Assuming you are on a mac/linux machine. If on Windows, use "gradlew.bat" instead of "./gradlew":
1) Close Android Studio
2) Open command line to the root of your project (the location of gradlew)
3) Run "./gradlew clean" to clean your project
4) Run "./gradlew --stop" to kill off any remnant Android Studio gradle daemons which may be caching stuff
5) Run "./gradlew assembleDebug" to build your project anew. (I am assuming you are building a basic debug configuration. If not, feel free to run "assemble" with your custom configuration.) If there are any issues with the project, you will see them here.
6) Restart Android Studio and try building again.
The kit was there untill I updated Qt due to certain problem.
In option > android I have set everything up, such as the SDK, NDK, Ant and JDK.
Below NDK it says it has found 6 toolchains.
In the kits section it only auto-detected one, which is the desktop...
I ran into this same problem - it was because I hadn't installed the QT compilers for Android.
To fix it, you need to go back to the installer (may need to uninstall the current version or install in a new directory) and expand the QT version you're using then check the relevant Android packages to be installed. Once the install is complete, set the SDK, NDK, JDK, and Ant and it should show the new kits in the build and run page.
You have not selected any Qt version. You should select something like Qt 5.3 (Android_ARMV7) for that field.
You can also Goto Tools > Option > Android settings page and make sure Automatically create kits for Android tool chains is checked, and apply it. If you check this option, it will create the kit with an appropriate name.
Now, goto Tools > Option > Build and Run settings page, and click on Kits tab and check if Qt Creator created the Android kits.